Path: utzoo!attcan!uunet!wiley!david From: david@wiley.UUCP (David Hull) Newsgroups: comp.unix.wizards Subject: How to send child signal when parent exits? Message-ID: <8948@wiley.UUCP> Date: 22 Feb 90 10:09:34 GMT Organization: TRW Inc., Redondo Beach, CA Lines: 20 I've written a replacement for biff/comsat that works even when the mail spool directory is mounted over NFS and the mail is being delivered on another machine. It wakes up every minute and stats the user's mail file to decide whether he has received any new mail. The program should automatically die when the user logs out. I'd like it to receive a SIGHUP when its parent, the login shell, exits, but haven't been able to make it work. Aren't all the processes in the same process group as the login supposed to receive a SIGHUP when it exits? The program works now by calling getppid right before it stats the file. If the parent has exited, init has inherited the program and the ppid is 1. It works but seems inelegant. Does anybody have any help? -David --------------------------------------- David Hull TRW Inc. Redondo Beach, CA david%wiley.uucp@csvax.caltech.edu ...!{uunet,cit-vax}!wiley!david