See my code.
After the fork(), the parent closes the active socket because the parent does not talk to anybody - it only listens for new connections.
After the fork(), the child closes the passive socket because the child doesn't listen for new connections - it only talks on the active socket to the current client.
In reply to Re: Socket descriptor passed across fork -- hanging
by Marshall
in thread Socket descriptor passed across fork -- hanging
by dd-b
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |