export SOCK_NONBLOCK, SOCK_CLOEXEC constants in Kgio
commitc22f2b5ebccbca8e04aa22821964f67c4a81c675
authorEric Wong <normalperson@yhbt.net>
Thu, 7 Jul 2011 02:11:47 +0000 (6 19:11 -0700)
committerEric Wong <normalperson@yhbt.net>
Thu, 7 Jul 2011 02:11:47 +0000 (6 19:11 -0700)
treea4771317e974c935cbc1ac564d32a8952641c2f1
parent8e1a53f99a752d8ccba324560a9e52bf6e80680d
export SOCK_NONBLOCK, SOCK_CLOEXEC constants in Kgio

It's more reliable than relying on IO::NONBLOCK and
Fcntl::FD_CLOEXEC constants.  The existing constants are not
guaranteed to be equivalent to what accept4() takes even
though the current Linux implementation does it this way.
ext/kgio/accept.c
test/test_accept_flags.rb [new file with mode: 0644]