Re: Problem with socketpair , AF_UNIX and select call - can anybody through any light on this!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Miles Sabin wrote:
Try losing the shutdowns ... you just need to close.

Yes. Definitely lose the shutdowns. The close() function decrements the descriptor's reference count. The socket is really only terminated when the reference count goes to zero. Shutdown, on the other hand, will terminate the socket no matter what the reference count is.

In your case, shutdown causes the parent to terminate the child's socket and vice-versa. The sockets and corresponding file descriptors are no longer valid.
--
Steve Croll


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux