Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!natinst!dell!baldur!dcm From: dcm@baldur.dell.com (Dave McCracken) Newsgroups: comp.sys.apollo Subject: Re: Keeping DM from killing process at logout Message-ID: Date: 19 Apr 91 16:51:34 GMT References: <1991Apr15.221826.11448@cci632.cci.com> <1129@eba.eb.ele.tue.nl> <2729@prles2.prl.philips.nl> Sender: @dell.dell.com Organization: Dell Computer Corporation, Austin, Texas 78759-7299 Lines: 33 hooft@prl.philips.nl (Peter van Hooft) writes: >In <1129@eba.eb.ele.tue.nl> wjw@ebh.eb.ele.tue.nl (Willem Jan Withagen) writes: >>In article rtb@cernapo.cern.ch (Rainer Tobbicke) writes: >>=>mth@cci632.cci.com (Michael Hickman) writes: >>=>>I have written a program in PERL that forks daemon process. I have the >And the daemons are killed when you log out. >>As far as I was able to drag this for my Apollo-support person long time ago. >>It seems that when the DM logs a user off, it sends all the processes >>owned by the display/user not only the signal SIGHUP but also SIGAPOLLO. Beginning at SR10.0, you can just signal(SIGHUP, SIG_IGN), or run it as "nohup daemon". When the DM is trying to log out, it generates a list of processes it would like to kill. The major criterion is any process that does not have the "server flag" set, which is part of internal process state. The DM then sends SIGHUP to all processes on the remaining list. It goes through the iterative process of generating the list, then signalling, several times. If this does not succeed, it then tries again with a status that translates to SIGAPOLLO. In a process that has SIGHUP set to ignore, the signal processing code in the OS will set the "server flag" for that process before it drops the signal. This process will then get ignored by the DM, and be allowed to live. -- Dave McCracken dcm@dell.dell.com (512) 343-3720 Dell Computer 9505 Arboretum Blvd Austin, TX 78759-7299