Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!mips!zaphod.mps.ohio-state.edu!usc!jarthur!ucivax!orion.oac.uci.edu!ucsd!ucrmath!rearl From: rearl@watnxt3.ucr.edu (Robert Earl) Newsgroups: comp.unix.questions Subject: Re: Process ID of th shell Message-ID: Date: 31 May 91 14:50:37 GMT References: <11563@mirsa.inria.fr> Sender: news@ucrmath.ucr.edu Followup-To: comp.unix.questions Distribution: world,local Organization: (EVIL!) Lines: 26 In-reply-to: gilette@trinidad.inria.fr's message of 31 May 91 12:06:30 GMT In article <11563@mirsa.inria.fr> gilette@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@watnxt3.ucr.edu \ --Sisters of Mercy rearl@gnu.ai.mit.edu /