Path: utzoo!attcan!uunet!husc6!rutgers!umn-d-ub!nic.MR.NET!umn-cs!cctb!randy From: randy@cctb.mn.org (Randy Orrison) Newsgroups: comp.mail.elm Subject: Re: newmail also displays on console (bug) Message-ID: <192@cctb.mn.org> Date: 13 Mar 89 04:17:55 GMT References: <316@wubios.wustl.edu> <7310001@hpscdc.HP.COM> <92@dsinc.UUCP> Reply-To: randy@cctb.mn.org (Randy Orrison) Organization: Chemical Computer Thinking Battery, St. Paul, MN Lines: 18 In article <7310001@hpscdc.HP.COM> schmitz@hpscdc.HP.COM (John Schmitz) writes: > Re: newmail not going away: > Would it also be possible to record the id of the parent's shell and > do a kill(parent_id, 0) to detect the parent shell going away? Why not just do a getppid() when it starts, record that, and if it ever changes, exit()? I don't have my man pages handy, but I would be very surprised if getppid() returned the old parent pid after it had exited, in any version. This would also work in braindamaged configurations where the process doesn't get a SIGHUP for some reason. -randy -- Randy Orrison - Chemical Computer Thinking Battery - randy@cctb.mn.org (aka randy@{umn-cs.uucp, ux.acss.umn.edu, umnacvx.bitnet, garnet.uucp}) "Blow a lawyer to pieces / It's the obvious way Don't wait for a thesis / Do it today" - Al Stewart