Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have recently started using GNU screen on cygwin, but the functionality to terminate a foreground process with CTRL-C does not seem to work when there is an active screen session. Is there a workaround for this?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

If you mean to terminate in the screen it-self, you could try the following shortcut:

Ctrl-A, k

It will send kill signal to the process (additional confirmation is required).

Press Ctrl-A, ? to see more options.


Other methods:

You can suspend the job:

Control-Z

and it'll return you the job ID of that process

To continue the process in foreground, you can run:

fg

In the background:

bg

If you want to kill it:

kill -9 %1

(replace 1 with your job ID).

Note: Don't forget about % sign, otherwise you'll kill something else.

share|improve this answer
    
Thanks for the response - unfortunately this didn't work when I tried it though. Control-Z did not seem to suspend the job - the screen session just hangs when I press that. Is there anything else I could try? –  Rich Ashworth Aug 9 '12 at 9:41
    
updated the answer. –  kenorb Aug 9 '12 at 10:08
    
Thanks! That's exactly what I was looking for. –  Rich Ashworth Aug 9 '12 at 10:57
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.