On Sat, Apr 01, 2017 at 09:12:08AM +0200, Otto Moerbeek wrote:

> On Sat, Apr 01, 2017 at 01:20:25AM -0500, Luke Small wrote:
> 
> > Here are two programs. They both fork two clients that try to connect on
> > port 'portno' that is listened to in main(). It spawns a receive that
> > receives passed file descriptors passed from main(). It passes a file
> > descriptor of the client connection to receive twice. server_sample0.c uses
> > the man page code. server_sample.c uses my example. the former fails to
> > pass the file descriptor on the second try. the latter succeeds both times.
> > I don't think you have any more questions.
> 
> Well, it took some effort to get this out of you.
> 
> It seems that a problem exists indeed. It happens when the iovec data is
> not filled in, as the example uses. recv(2) only returns the number of
> bytes read from the iovec, so there seems to be some confusion about a
> failed read and a read of zero bytes.
> I'll check with the standard what is supposed to happen when
> only auciliary data is sent.

That's a nice mix of auxiliary and ancillary. I always thought is was
the formar, but the man page says the latter.

        -Otto

Reply via email to