Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!bcm!convex!news From: tchrist@convex.COM (Tom Christiansen) Newsgroups: comp.unix.programmer Subject: Re: how process in background can kill itself after logout (BSD unix). Message-ID: <1991Jan30.024132.17535@convex.com> Date: 30 Jan 91 02:41:32 GMT References: <1991Jan29.012702.7265@nntp-server.caltech.edu> <405@bria> Sender: news@convex.com (news access account) Reply-To: tchrist@convex.COM (Tom Christiansen) Organization: CONVEX Software Development, Richardson, TX Lines: 22 Nntp-Posting-Host: pixel.convex.com 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 )