Article View: comp.mail.misc
Article #580Re: Checking for new mail (and killing bkgnd process on logout?)
From: Jonathan Corbet
Date: Fri, 01 Sep 1989 20:56
Date: Fri, 01 Sep 1989 20:56
23 lines
1246 bytes
1246 bytes
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
Technical Details
Message-ID:
<4201@ncar.ucar.edu>Path:
arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!mead!corbetReferences:
<105@csnz.co.nz> <1989Aug26.200813.15629@twwells.com> <64@calcite.UUCP> <128@isgtec.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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