Xref: utzoo comp.mail.misc:2320 comp.unix.xenix:7365 comp.unix.wizards:17901 Path: utzoo!attcan!utgpu!watmath!iuvax!purdue!bu-cs!encore!multimax.UUCP From: jdarcy@multimax.UUCP (Jeff d'Arcy,OS Avenue,2627,) Newsgroups: comp.mail.misc,comp.unix.xenix,comp.unix.wizards Subject: Re: Checking for new mail (and killing bkgnd process on logout?) Message-ID: <9828@multimax.Encore.COM> Date: 30 Aug 89 14:55:26 GMT References: <128@isgtec.UUCP> Followup-To: comp.mail.misc Lines: 19 bmw@isgtec.UUCP (Bruce Walker): > [description of mail check program not terminating on BSD ] > > 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}'`& What a happy coincidence! After changing jobs and finding no such beast available, I wrote a program that does just what you describe. I solved the exact same problem by adding code to the main loop that checks the parent process ID against whatever it was when the program started. If the two don't match, the parent obviously went away. In two weeks of constant use on several machines (UmaxV and Umax4.x) I have seen neither premature terminations or excessive persistence. Jeff d'Arcy jdarcy@encore.com (508) 460-0500 x2627 I am solely responsible for my own opinions, and not at all for others'