Xref: utzoo comp.mail.misc:2329 comp.unix.xenix:7406 comp.unix.wizards:17940 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!mead!corbet From: corbet@mead.uucp (Jonathan Corbet) Newsgroups: comp.mail.misc,comp.unix.xenix,comp.unix.wizards Subject: Re: Checking for new mail (and killing bkgnd process on logout?) Message-ID: <4201@ncar.ucar.edu> Date: 1 Sep 89 20:56:46 GMT References: <105@csnz.co.nz> <1989Aug26.200813.15629@twwells.com> <64@calcite.UUCP> <128@isgtec.UUCP> Sender: news@ncar.ucar.edu Reply-To: corbet@mead.UCAR.EDU (Jonathan Corbet) Organization: Field Observing Facility, NCAR, Boulder, CO Lines: 23 bmw@isgtec.UUCP (Bruce Walker): >However, if you do this on a Sun (f'rinstance), the process >disconnects from your tty and continues running (inherited by root). >You end up with dozens of the little buggers. > >My (slightly klugey) solution is to add a line to my .logout (csh): > > /bin/kill -9 `ps x | awk '$5=="checkmail" {print $1}'`& > >Anyone know a better way? How about if you add a line like: signal (SIGHUP, SIG_DFL); toward the beginning of your main program? That will cause the program to die when the parent process does... Jonathan Corbet National Center for Atmospheric Research, Field Observing Facility corbet@stout.ucar.edu