Re: Socket inheritance: A tale of two vendors
- From: googlegroups@xxxxxxxxxx
- Date: 6 Dec 2005 22:05:14 -0800
Chris Friesen wrote:
> If the problem is the socket inheritance, one possible workaround would
> be to rename the daemon (we'll call it "daemon.orig"), then create a new
> app called "daemon" that simply closes all open sockets other than 0/1/2
> and then exec()'s "daemon.orig" with the same parameters with which it
> itself was called.
Thank you for your thoughts, Chris. The idea of a wrapper wasn't one
I'd considered while pondering workarounds.
The far simpler workaround is to make darn sure that "daemon" is
running all the time, so that it's client application doesn't have to
fire it up. In that case, sockets never get inherited and the whole
exercise is moot.
At this point, I'm looking to get the software fixed, not for
workarounds, and the next bit of your post offers a hint of what I was
looking for:
> Something else to consider--if they've messed this up, they might have
> screwed up other stuff too. You might also want to reset signal
> handlers and clear the signal mask before doing the exec().
Now this part of your post is very useful to me!
Apparently the procedures in UNP regarding closing everything, signal
handlers, signal mask, process groups, etc is standard practice?
Daemons that don't do this are "messed up"?
The bind I'm in is: Which vendor should I go harass about the problem?
Vendor A for the application's failure to set close-on-exec on his
sockets
-- or --
Vendor B for the daemon's failure to close sockets it doesn't need
You're steering me toward vendor B.
/chris marget
.
- Follow-Ups:
- Re: Socket inheritance: A tale of two vendors
- From: Chris Friesen
- Re: Socket inheritance: A tale of two vendors
- From: Barry Margolin
- Re: Socket inheritance: A tale of two vendors
- References:
- Socket inheritance: A tale of two vendors
- From: googlegroups
- Re: Socket inheritance: A tale of two vendors
- From: Chris Friesen
- Socket inheritance: A tale of two vendors
- Prev by Date: Rephrasing my UDP question
- Next by Date: Re: UDP Tunneling
- Previous by thread: Re: Socket inheritance: A tale of two vendors
- Next by thread: Re: Socket inheritance: A tale of two vendors
- Index(es):
Relevant Pages
|
|