Unaccepted tcp connections
Hello,
This e-mail is offtopic but is related to the networking code. I am working on an inet daemon that listens for tcp connections and passes the descriptor returned by listen to a child program to handle. It turns out that many child programs error during startup and exit without accepting the connection (linuxconf is one of them). The daemon that listens sees the descriptor as readable and starts a new child. This can loop forever.
The question is how can a parent process reliably determine that its child has accepted the connection? Also, is it possible to tell anything about a connection that has returned from listen but not yet accepted? For instance the source IP address?
Thanks,
Steve Grubb
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com