Re: Ignoring SIGHUP when becoming a daemon?
From: Rich Teer (rich.teer_at_rite-group.com)
Date: 05/23/03
- Next message: Valentin Nechayev: "Re: Complete list of process attributes?"
- Previous message: Rich Teer: "Ignoring SIGHUP when becoming a daemon?"
- In reply to: Rich Teer: "Ignoring SIGHUP when becoming a daemon?"
- Next in thread: James Carlson: "Re: Ignoring SIGHUP when becoming a daemon?"
- Reply: James Carlson: "Re: Ignoring SIGHUP when becoming a daemon?"
- Reply: Michael Kerrisk: "Re: Ignoring SIGHUP when becoming a daemon?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Fri, 23 May 2003 04:35:21 GMT
On Fri, 23 May 2003, Rich Teer wrote:
> I've written a function to make the caller into a daemon
> on Solaris, and the behaviour is the same with or without
> ignoring SIGHUP. Right now, I'm planning to leave out the
> ignoring of SIGHUP.
Sorry to follow up to myself, but I've got it sussed, thanks
to Andrew Gierth's FAQ (I should've known this already, but
it's getting late). Anyway, here's the pertinent info:
* When the process that dies is the session leader of a session that is
attached to a terminal device, SIGHUP is sent to all processes in the
foreground process group of that terminal device.
So, once a daemon has called setsid() (and therefore lost its
controlling terminal), the other processes will NOT be sent a
SIGHUP.
-- Rich Teer, SCNA, SCSA President, Rite Online Inc. Voice: +1 (250) 979-1638 URL: http://www.rite-online.net
- Next message: Valentin Nechayev: "Re: Complete list of process attributes?"
- Previous message: Rich Teer: "Ignoring SIGHUP when becoming a daemon?"
- In reply to: Rich Teer: "Ignoring SIGHUP when becoming a daemon?"
- Next in thread: James Carlson: "Re: Ignoring SIGHUP when becoming a daemon?"
- Reply: James Carlson: "Re: Ignoring SIGHUP when becoming a daemon?"
- Reply: Michael Kerrisk: "Re: Ignoring SIGHUP when becoming a daemon?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]