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



On Fri, Oct 12, 2007 at 11:29:26AM +0100, Andy Green wrote:
Somebody in the thread at some point said:

The SOCK_DGRAM is because I have small packets flowing that I do not
want fragmented but do not mind if they get lost, .... but then inside a
machine that does not matter. However with SOCK_STREAM I get zero length
messages but still ready to read continuously!!! See attached!

Why don't you try removing the O_NONBLOCK since you test with select...

fcntl(fd[0], F_SETFL, fcntl(fd[0], F_GETFL, 0) | O_NONBLOCK);
fcntl(fd[1], F_SETFL, fcntl(fd[1], F_GETFL, 0) | O_NONBLOCK);

In some instances it is possible to select to return OK and an operation
then blocks. So it is always best to use select/poll, have the fds set
non-block, and check for EINTR/EAGAIN.

--
lfr
0/0

Attachment: pgpQHT7PLgtAV.pgp
Description: PGP signature

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

Relevant Pages

  • Re: OT : Happy Star Wars Day
    ... since GW has obviously lost his mind, ... matter of time before the official release of the holiday special. ... So tell me, which was more "special," Bea Arthur singing in a bar, or ...
    (rec.games.frp.dnd)
  • Re: OT : Happy Star Wars Day
    ... trilogy will be released on DVD: ... since GW has obviously lost his mind, ... matter of time before the official release of the holiday special. ...
    (rec.games.frp.dnd)
  • Re: Problem with socketpair , AF_UNIX and select call - can anybody through any light on this!
    ... want fragmented but do not mind if they get lost, ... However with SOCK_STREAM I get zero length ... Why don't you try removing the O_NONBLOCK since you test with select... ...
    (Fedora)
  • Re: Nate Cambell Lost
    ... I do take this memory matter of my mine very serious due to the fact I ... lost or miss placed a few things that in my mind, ... case of missing pool carring case, I lost it, and due to how it was on ...
    (rec.sport.boxing)
  • Man lost his mind, no matter how big it is
    ... Man lost his mind, no matter how big it is, for a black hole. ...
    (soc.culture.vietnamese)