Svante Signell, on Tue 01 Dec 2015 15:37:14 +0100, wrote: > Furthermore, the RPC for socket_setopt in socket.defs > is wrong: The set value should be returned in parameter optval, see > http://pubs.opengroup.org/onlinepubs/9699919799/functions/setsockopt.html > and setsockopt(2).
I don't understand: do you mean that setsockopt() should return back the value that was actually set into the option_value parameter? That can't be, since it's a const void *. Please be more specific, by writing code which examplifies the requested behavior, for instance. > + pipe->write_limit = write_limit; This is not enough: you also need to wake the part of the pipe which wanted to write data there. Think about the following scenario process A writes 64KB to the buffer, there is room for it so this completes process A tries to write 64KB to the buffer, there is no room any more for it, so it blocks process B sets the RCVBUF to 1MB A must be waken up when B increases the pipe size, so A can continue filling the pipe. The waking up should be done just like when B consumes data. Samuel