Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!agate!bionet!ames!amdahl!pacbell!pbhyf!rob From: rob@pbhyf.PacBell.COM (Rob Bernardo) Newsgroups: comp.mail.elm Subject: Re: newmail also displays on console (bug) Message-ID: <4767@pbhyf.PacBell.COM> Date: 28 Feb 89 04:49:03 GMT References: <316@wubios.wustl.edu> <890001@hpausla.HP.COM> Reply-To: rob@pbhyf.PacBell.COM (Rob Bernardo) Organization: Pacific * Bell, San Ramon, CA Lines: 29 In article <890001@hpausla.HP.COM> brianw@hpausla.HP.COM (Brian Wallis) writes: +In Elm 2.0 and 2.1, newmail with the AUTO_BACKGROUND option executes a +fork and the parent then exits. Under HP-UX 6.5 this gives a problem +since when the parent exits the child process's parent becomes init +(pid=1) so that when you logout, the newmail process is left running +(and writing to whatever terminal you were logged into). ... +logging out will not kill this process! you have to explicitly kill it +yourself. This is defined HP-UX behaviour as in exit(2):- [quotes manual how init inherits processes that "lose" their parent process.] ... +Is this normal *nix operation? I would have thought that the child +process's parent would be set to the parent of the exiting parent (do +I make my self obscure?) Yes, but you forgot one thing, and maybe this is what's not happening on some systems. When you log out a SIGHUP signal is supposed to be sent to all processes in the process group, which should include your newmail in the background. SIGHUP will kill newmail. Now it could be that someone set your login ports to default to "no hang up on last close" (see stty(1)), which I'd say is bad practice. It interferes with the proper way of killing processes if your login connection should accidentally drop (as in hardware probelm or hung up phone line.) See your sys admin about that. -- Rob Bernardo, Pacific Bell UNIX/C Reusable Code Library Email: ...![backbone]!pacbell!pbhyf!rob OR rob@pbhyf.PacBell.COM Office: (415) 823-2417 Room 4E850O San Ramon Valley Administrative Center Residence: (415) 827-4301 R Bar JB, Concord, California