On Wed, Jun 20, 2012 at 4:26 AM, Paul Irofti <[email protected]> wrote:
> +               SCARG(&bfa, cmd) = F_SETFL;
> +               SCARG(&bfa, arg) = (void *)O_NONBLOCK;
> +               error = sys_fcntl(p, &bfa, retval);

<mumble>  That assumes that a new socket can't have any of the
FCNTLFLAGS set on it, which _is_ true, currently...

The casts have me second guessing whether the argument passing really
is correct, though I think it is.  I would still suggest a small linux
test program that passes those flags then checks the results with
fcntl(F_GETFL) and fcntl(GETFD).  If it passes that, then it's better
than what's there.


Philip Guenther

Reply via email to