Suspending a process in bash running inside console2
Asked Answered
A

3

9

In other terminals I would press Ctrl+z to suspend an application, often to then issue bg to send it into background.

In console2 Ctrl+z does nothing, probably because the key combination has a different meaning in Windows. But is there a way to achieve the same effect, save for 'process &'?

(I know I should use & and it works, but sometimes I would setup shell, start an editor, begin editing, then return to the console just to find that I forgot the & and I can't use the shell. It annoys me that I then have to either open a new shell and set it up again, or quit the editor, start it with & and set it up again).

Actinomycin answered 26/10, 2011 at 7:26 Comment(0)
L
3

This annoying issue surely is a console2 bug. You may find something about at its issue tracker.

Anyway, what ctrl+z does is send a SIGSTOP signal to current process. So, you can still send that signal from another session/tab. (If it is less annoying than stop and start with &). To do that, you can use the kill command.

kill -s SIGSTOP pid

(pid is the process PID number)

Hope it helps.

Leucoderma answered 28/10, 2011 at 7:53 Comment(0)
B
18

In Console2, ctrl-c is bound by default to copy (text) you have to press ctrl-shift-c to cancel job.

Bryonbryony answered 20/8, 2014 at 7:47 Comment(2)
and does ctrl+shift-z suspend a job? (that's what I was asking). NB I don't use windows / console2 anymore, so I can't check myself.Actinomycin
Ctrl+Shift-z or Ctrl-z do not work for me. Ctrl+Shift+c works.Assemble
E
10

You could also try to remove the hotkey that is conflicting with ctrl+z.

I was having trouble using ctrl+c to cancel the execution of a script. As soon as I removed that hotkey, ctrl+c had its default restored and I was able to cancel executions properly.

Evalynevan answered 19/6, 2013 at 14:13 Comment(2)
do you mean a hot key somewhere in console2 preferences, or elsewhere in windows?Actinomycin
Sorry if I expressed it bad. I meant the one accessible through Console2's preferences. If you remove the action that is bound to that key combination, their default behavior is going to be restored.Evalynevan
L
3

This annoying issue surely is a console2 bug. You may find something about at its issue tracker.

Anyway, what ctrl+z does is send a SIGSTOP signal to current process. So, you can still send that signal from another session/tab. (If it is less annoying than stop and start with &). To do that, you can use the kill command.

kill -s SIGSTOP pid

(pid is the process PID number)

Hope it helps.

Leucoderma answered 28/10, 2011 at 7:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.