Checking for new mail (and killing bkgnd process on logout?)

Jeff d'Arcy,OS Avenue,2627, jdarcy at multimax.UUCP
Thu Aug 31 00:55:26 AEST 1989


bmw at 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 at encore.com		(508) 460-0500 x2627
  I am solely responsible for my own opinions, and not at all for others'



More information about the Comp.unix.wizards mailing list