Can you select() socketpair()-generated descriptors?

From: Jo (JoJoTwilligo_at_hotmail.com)
Date: 09/29/04


Date: 29 Sep 2004 12:33:59 -0700

I'm pulling my hair out over trying to get a socket passed from one
process to another. My latest problem is in getting the receiving
process to detect the incoming socket. I'm using select() as I do with
all the socket descriptors and pipe descriptors, but it just times
out, as though the socket was never sent. If I create a set of
descriptors using socketpair(AF_UNIX, SOL_SOCKET, 0, desAncils), does
select() treat those descriptors the same as those created with
pipe(), accept() or connect()?



Relevant Pages

  • [patch] SOCK_CLOEXEC, SOCK_NONBLOCK and MSG_CMSG_CLOEXEC
    ... MSG_CMSG_CLOEXEC to recvmsgmakes file descriptors ... I do not pass the SOCK_* flags to MAC because this may cause incorrect ... +.Xr socket 2, ...
    (freebsd-hackers)
  • Re: reading a fixed-length message
    ... properly (close the socket, serial port, etc.) ... depending on the descriptors you are using. ... if serialfd for write ...
    (comp.unix.programmer)
  • Can you select() socketpair()-generated descriptors?
    ... I'm pulling my hair out over trying to get a socket passed from one ... My latest problem is in getting the receiving ... all the socket descriptors and pipe descriptors, ...
    (comp.unix.programmer)
  • Re: Linux select command issues
    ... double-check any descriptors (by referring ... It comes down to whether or not 'select' is a pure status reporting ... If it's a pure status reporting function, ... What would happen if you 'select'ed for write on a socket that wasn't ...
    (comp.unix.programmer)
  • Re: Sockets and threads...
    ... Mark Seger wrote: ... Are you opening sockets "internally" from one ... I had tried to share descriptors and failed ... That only works if you only need to write on the socket. ...
    (comp.lang.perl.misc)