[Pdx-pm] Who's your Daddy? [was: job control]

Randall Hansen randall at sonofhans.net
Mon Jun 2 01:26:27 CDT 2003

Thus spoke "Michael R. Wolf" <MichaelRunningWolf at att.net>
( Sun, 01 Jun 2003 22:08:10 -0700 ):

> I've never done something like this, but you may have to creat a
> hash of parent/child processes, create a tree, go climbing around,
> and query the status of the jobs that are on the right branch.

Thanks, Michael.  A version of this solution was as close as I've come
to working, but it has problems (still working on Tom's pipe

It's easier that you think, but very similar.  The 'ps' command has a
'T' switch to select all processes on a current terminal -- all your
children, so to speak.  On a similar note, 'ps' has an 'f' switch that
shows processes in an ASCII-art tree (very cool).

The trouble is, I haven't been able to get 'ps' to tell me which
processes are suspended.  Some processes have square brackets around
their names, which means 'swapped out to disk,' but this set doesn't
reliable intersect with the set of suspended processes.

Nor have I found a way to query the status of a job without using a
bash builtin.  If there is one, I'd love to know.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.pm.org/pipermail/pdx-pm-list/attachments/20030601/9fc051b9/attachment.bin

More information about the Pdx-pm-list mailing list