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

gregg.g.wonderly gregg at cbnewsc.ATT.COM
Fri Sep 1 03:24:45 AEST 1989


In article <128 at isgtec.UUCP>, bmw at isgtec.UUCP (Bruce Walker) writes:
> You are supposed to start it like this (usually from .login):
 
> 	$ checkmail&
 
> 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?

Yes, just do

	sh -c 'checkmail &'

This will start the process as a subprocess of sh(1) with the process
group left intact.  Last I knew, the bourne shell had not been infected
with this bug.  I say bug because it really is.  The process should get
SIGHUP unless I 'nohup' it myself.

-- 
-----
gregg.g.wonderly at att.com   (AT&T bell laboratories)



More information about the Comp.unix.xenix mailing list