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]
- To: For users of Fedora <fedora-list@xxxxxxxxxx>
- Subject: Problem with socketpair , AF_UNIX and select call - can anybody through any light on this!
- From: Howard Wilkinson <howard@xxxxxxxxxxx>
- Date: Fri, 12 Oct 2007 08:49:26 +0100
- Organization: Coherent Technology Limited
- Reply-to: For users of Fedora <fedora-list@xxxxxxxxxx>
- User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.6) Gecko/20070728 Thunderbird/2.0.0.6 Mnenhy/0.7.5.666
I have a piece of code that is listening to multiple incoming
communications channels over UDP and TCP. This code has set the sockets
non-blocking and is using select with a time-out to detect when there is
I-O traffic to process.
I wanted to add a socketpair connection from the master process to the
servers which implement the actual functionality. I created the
socketpair, set both ends non-blocking and added it to the select set of
fd's. I get an immediate return saying that the socket is ready to read
but when I issue a recv I get -1 (EAGAIN). Nothing I have tried sets
the required behaviour of only returning when there is 'real' data to read.
Anybody seen this, is it a known problem with Linux kernels? (I am
currently running 2.6.22.9-91.fc7)
Is there a known work round. I am currently thinking of replacing the
AF_UNIX socket pair with a mesh of AF_INET/SOCK_DGRAM/localhost channels.
Regards, Howard.
[Index of Archives]
[Current Fedora Users]
[Fedora Desktop]
[Fedora SELinux]
[Yosemite News]
[Yosemite Photos]
[KDE Users]
[Fedora Tools]
[Fedora Docs]