Re: recv(2) with a argument of flag of literal 0



On Nov 3, 1:00 am, viza <tom.v...@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:

According to Linux man recv:

"The  flags argument to a recv() call is formed by OR'ing one or more of
 the following values: ..."

According to SUSv3: "flags Specifies the type of message reception.
Values of this argument are formed by logically OR'ing zero or more of
the following values: ..."

So 0 is a legal value in supposedly-portable code, but it might not work
on Linux.

I suspect that the Linux documentation is just wrong and that Linux does
allow 0 as required by POSIX/SUS, but I haven't tested it.

Linux does allow 0 as required by POSIX /SUS. The SUS wording is
awful, but precise. The Linux wording is nice, but imprecise.

DS
.



Relevant Pages

  • Re: PATCH for a more-POSIX `ps, and related adventures
    ... the SUSv3 ps problem is finally being addressed. ... This should have been done with ps too, as the BSD and System ... > Linux world if you did; I swiped the idea from Digital UNIX. ... However, when the first argument doesn't start with a hyphen, FreeBSD ps ...
    (freebsd-arch)
  • Re: Making malloc() fail -- stuck
    ... >> (the limits are specified in bytes), ... > for Linux. ... SUSv3 writes, and even the ... Linux man page for setrlimit() states something similar (but does not ...
    (comp.unix.programmer)
  • Re: posix ps (was Re: Adding `pgrep and `pkill to /usr/bin)
    ... On Fri, 2004-03-26 at 20:05, Julian Elischer wrote: ... > Not objecting, but just making sure who is in this before it goes away.. ... patch the SUSv3 ps specification ... get Linux, one BSD, one SysV, and one OSF/1 to conform ...
    (freebsd-arch)