[ale] fun with processes
Eric Z. Ayers
eric.ayers at mindspring.com
Sat Aug 7 10:12:43 EDT 1999
Ben Phillips writes:
> On Thu, 5 Aug 1999, Eric Z. Ayers wrote:
> > Ben Phillips writes:
> > > Is there a way to resume a backgrounded process from a shell other than
> > > the one that initiated it? If not, why?
> > You can use kill -STOP <pid> to suspend a process and kill -CONT <pid>
> > to resume it. So you have to know the pid and have permissions to
> > send the task a signal.
> This doesn't work, BTW. Not from a shell other than the one that initiated
> the process. I'm still looking into this 'screen' thing. But really I was
> curious about the underlying architectural limitations. What about a
> process is so tied to the shell that launched it that UNIX can't easily
> allow another shell to resume the process?
Are you sure you are using the 'pid' and not the job number?
in one window
In another window:
[eric at cricket eric]$ ps auxww | grep mytest
eric 32718 0.0 0.4 720 264 p6 S 10:09 0:00 ./mytest
[eric at cricket eric]$ kill -STOP 32718
[eric at cricket eric]$ kill -CONT 32718
(what I saw in the first window)
+ Stopped (signal) ./mytest
[eric at cricket eric]$ Hello World!
More information about the Ale