[lug] socket programming/kernel question
Zan Lynx
zlynx at acm.org
Wed Mar 5 16:22:26 MST 2003
On Wed, 2003-03-05 at 16:08, Bear Giles wrote:
> Zan Lynx wrote:
> > The server gets a shutdown request or a signal (You _can_ catch SIGBUS,
> > SIGILL, and SIGSEGV for this) and execs a process that will hold state
> > for it. This includes the still open sockets. Then, when this tiny
> > state-holder process gets a signal, like SIGUSR1, it execs the original
> > again, with flags to tell it to resume state. It can use a connection
> > log file or a bit of shared memory to figure out what file descriptors
> > point where.
>
> That still gives you zombies.
>
> But a variant is to use a Unix socket to pass a SCM_RIGHTS (iirc)
> message with all of the open sockets. This "has the same effect
> as calling dup()". The original program dies outright, it's
> restarted, and it gets its sockets back via the same mechanism.
That sounds like a lot of work for a signal handler that was possibly
called because of corrupted memory.
Zombies from what? Child processes that may be still running when the
parent execs? I suppose the state-holder could reap them for you. It
could even run the process table and kill anything with itself as parent
pid.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20030305/b2d4ac6c/attachment.pgp>
More information about the LUG
mailing list