[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: waiting for other process..
On Wed, 21 Oct 1998, Ze'ev Maor wrote:
> How can I wait under sh (not wait() ) for a process that isn't in the
> context of the shell that called the wait ??
just for 'the heck of it', if both processes run under the same UID (i.e.
the shell, and the other process), or the shell runs as root, AND you
don't mind realy realy slowing down the other process, and getting the
shell to waste some resources, and assuming you have the PID of the other
process, then all your shell needs to do (on linux) is:
strace -p PID >& /dev/null (assuming csh or tcsh).
or
strace -p PID > /dev/null 2>1 (assuming bash or sh).
strace shold exit when the other process exits.
ofcourse, this is not a good idea, but it is interesting...
guy