now changes behaviour of sigint only for parent when foreground process is running, also fixed some indentation