Re: [RFC] Is sendmsg without data but with cmsg OK?

Alan Cox (alan@lxorguk.ukuu.org.uk)
Wed, 28 Oct 1998 19:33:16 +0000 (GMT)


> Alan, the current code in net/af_unix.c silently discards messages
> with zero length of data part, even if they do contain cmsg's. Does
> something terrrible a-la POSIX require such behaviour? If it doesn't I
> have a patch for you ;-/ I think that current behaviour is wrong, because
> a) if all we are going to do is to pass some descriptors, well,
> sending some dummy data seems klugy.

Nod. For portability its needed on other platforms too

> b) even if such messages should be discarded it's not too nice to
> discard them silently.

Ok.

> c) discarding such beasts for SOCK_STREAM and allowing them for
> SOCK_DGRAM sounds wrong.

You can't return a 0 datagram for SOCK_STREAM. 0 is EOF on a stream.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/