View previous topic :: View next topic |
Author |
Message |
Cojack n00b
Joined: 06 Feb 2003 Posts: 32 Location: Seattle, WA USA
|
Posted: Sun Oct 19, 2003 10:34 pm Post subject: Suspending a process |
|
|
I'm looking for a way to suspend/resume another user's running process. I've tried using the STOP and CONT signals with kill, but the program just bombed out. Is this the fault of the program, or something I could overcome with a different command?
Any help would be appreciated. _________________ Na-Na-Na-Na-Na-Na-Na-Na Leader! |
|
Back to top |
|
|
dma Guru
Joined: 31 Jan 2003 Posts: 437 Location: Charlotte, NC, USA
|
Posted: Sun Oct 19, 2003 10:41 pm Post subject: |
|
|
Code: | root@laureate:/usr/include# stty -a
speed 38400 baud; rows 24; columns 80; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
From stty(1):
susp CHAR
CHAR will send a terminal stop signal
|
kill -STOP (some-pine-pid)
I tried it with pine and it works, but "fg" doesn't restore the terminal junk properly. No problems with "cat". Not sure how to restart it from the outside. |
|
Back to top |
|
|
nephros Advocate
Joined: 07 Feb 2003 Posts: 2139 Location: Graz, Austria (Europe - no kangaroos.)
|
Posted: Sun Oct 19, 2003 11:04 pm Post subject: |
|
|
STOP and CONT are the correct signals for this and they usually work well. But you can't send them to processes you don't own (unless $UID==0 of course).
Which program are you talking about? It probably doesn't do proper signal handling. _________________ Please put [SOLVED] in your topic if you are a moron. |
|
Back to top |
|
|
nephros Advocate
Joined: 07 Feb 2003 Posts: 2139 Location: Graz, Austria (Europe - no kangaroos.)
|
Posted: Sun Oct 19, 2003 11:12 pm Post subject: |
|
|
dma wrote: | Code: | root@laureate:/usr/include# stty -a
speed 38400 baud; rows 24; columns 80; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
From stty(1):
susp CHAR
CHAR will send a terminal stop signal
|
| I'm curious: are ^Q and ^S equivalent to SIGSTOP and SIGCONT?
I always thought they just made the shell block stdout so the app can't write on it anymore while the signals really stop the program execution. _________________ Please put [SOLVED] in your topic if you are a moron. |
|
Back to top |
|
|
|