Process ID of th shell

Robert Earl rearl at watnxt3.ucr.edu
Sat Jun 1 00:50:37 AEST 1991


In article <11563 at mirsa.inria.fr> gilette at trinidad.inria.fr (Serge Gilette) writes:

|    i was wondering how a script shell can tell the process id of the
|   shell it's attached to (in order to being able to kill it).
|
|    Gilette - Serge

Attached to?  You mean the current process?  It's in "$$"; as in

	kill -9 $$

There's no way to get the parent process from conventional shells.


But, if you just want to kill the parent...

	exec perl -e 'kill 9, getppid'

:-)

--
______________________________________________________________________
			\					
 robert earl		/	"Love is a many splintered thing"
 rearl at watnxt3.ucr.edu	\		--Sisters of Mercy
 rearl at gnu.ai.mit.edu	/



More information about the Comp.unix.questions mailing list