🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sun
Article #11828

Re: csh is nicer to its family than sh

#11828
From: David James Keegel
Date: Fri, 31 Mar 1989 04:08
31 lines
1606 bytes
by simon%robots.oxford.ac.uk@nss.cs.ucl.ac.uk (Simon Turner): 
] ------ Cut here for "reaper_p" ------
] #! /bin/sh
] 
] # Run the reaper -- expect to die shortly!
] reaper
] exit 0
] ---------- End of "reaper_p" ---------

If you change `reaper' to `nohup reaper', you should find that the
shelltool running sh will let the reaper survive.  Alternatively, you may
trap signals 1 (HUP) and 15 (TERM) inside reaper, to prevent its death.
Here is a new log file with most (but not CHLD) traps caught:

My PID is 6496
My parent is PID 6495
My grandparent is PID 6494
Killed my parent (PID 6495)
My PID is still 6496, but my new PPID is 1
Killed my former grandparent (PID 6494)
Reaper got signal 15
Reaper got signal 1
I'm still here...
Reaper got signal 1
Finished

I expect that the shell is sending signals to everyone in its process
group when it gets killed; this would include reaper even though it has
been `orphaned'. It was these signals which caused reaper to die.

			David Keegel    (djk@munnari.oz)
Technical Details
Message-ID: <1294@murtoa.cs.mu.oz.au>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request
References: <8903011847.AA22027@uk.ac.oxford.robots>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request
From: munnari!murtoa.oz.au!djk@uunet.uu.net (David James Keegel)
Newsgroups: comp.sys.sun
Subject: Re: csh is nicer to its family than sh
Keywords: Software
Message-ID: <1294@murtoa.cs.mu.oz.au>
Date: 31 Mar 89 04:08:17 GMT
References: <8903011847.AA22027@uk.ac.oxford.robots>
Sender: usenet@rice.edu
Organization: Sun-Spots
Lines: 31
Approved: Sun-Spots@rice.edu
Original-Date: 14 Mar 89 01:18:28 GMT
X-Sun-Spots-Digest: Volume 7, Issue 218, message 6 of 17