how process in background can kill itself after logout (BSD unix).

Tom Christiansen tchrist at convex.COM
Wed Jan 30 13:41:32 AEST 1991


>From the keyboard of :
:> I would like to be able for a process I have running in the
:> background to kill itself after I logout. I am using BSD unix
:> in a Sun Sparcserver 490. Because a bug in the OS the process
:> keep writing to the terminal after I logout. Any help will
:> be appreciated.
:
:Are you ignoring SIGHUP?  If you are, then change it so that the default
:action is taken (SIG_DFL), which is to croak the process.  

Sorry, that doesn't work on BSD systems very often -- backgrounded
processes see no reason to die just because they're in the background
and you log out.

You can watch for when the terminal changes owners, the utmp entry
changes, etc.  Or put something in your .logout if you're lucky.

--tom
--
"Hey, did you hear Stallman has replaced /vmunix with /vmunix.el?  Now
 he can finally have the whole O/S built-in to his editor like he
 always wanted!" --me (Tom Christiansen <tchrist at convex.com>)



More information about the Comp.unix.programmer mailing list