Problem with socketpair , AF_UNIX and select call - can anybody through any light on this!
Howard Wilkinson
howard at cohtech.com
Fri Oct 12 10:32:26 UTC 2007
Stephen Croll wrote:
> 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
>
Got it ... that fixes the problem for both SOCK_DGRAM and SOCK_STREAM
... thanks everybody I knew I was being thick somewhere!
--
Howard Wilkinson
Phone:
+44(20)76907075
Coherent Technology Limited
Fax:
23 Northampton Square,
Mobile:
+44(7980)639379
United Kingdom, EC1V 0HL
Email:
howard at cohtech.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20071012/e5596c85/attachment-0001.htm>
More information about the fedora-list
mailing list