Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/5/84; site wanginst.UUCP
Path: utzoo!utcs!lsuc!pesnta!amdcad!decwrl!decvax!wanginst!ss
From: ss@wanginst.UUCP (Sid Shapiro)
Newsgroups: net.unix
Subject: getting the pid from the csh
Message-ID: <240@wanginst.UUCP>
Date: Tue, 12-Feb-85 16:24:00 EST
Article-I.D.: wanginst.240
Posted: Tue Feb 12 16:24:00 1985
Date-Received: Wed, 13-Feb-85 17:12:27 EST
Distribution: net
Organization: Wang Institute, Tyngsboro, Ma.  01879
Lines: 22

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@Csnet-Relay.ARPA
	  (617)649-9731