getting the pid from the csh

Sid Shapiro ss at wanginst.UUCP
Wed Feb 13 07:24:00 AEST 1985


Hi there unix-folks.
In keeping with the discussions of a few weeks ago about how to
automatically kill backgrounded process from the csh upon logout, I
thought I'd ask the question another way.  Or at least I thought I'd
take another shot at it.  I thought, if I could simply record the pid
of the process in a file or variable, then, golly, killing it later
would be easy.

So I cheerfully set off to try and figure out how to capture the pid
that is returned when you type foo&

Well, after I exhausted all the variations I could think of, I went to
the csh sources.  It sure looked to me like the shell simply does a
printf of the pid.  But I'll be darned if I can redirect or backquote
or set something to get that number.

Can anyone offer words of wisdom?  Thanks,

Sid Shapiro -- Wang Institute of Graduate Studies
    [apollo, bbncca, ucadmus, decvax, linus, masscomp]!wanginst!ss
    ss%wang-inst at Csnet-Relay.ARPA
	  (617)649-9731



More information about the Comp.unix mailing list