added correct handling if user presses ctrl-c during foreground process