[PATCH] FD_CLOEXEC fcntl cleanup
This fixes a minor problem with fcntl. get_close_on_exec() uses FD_ISSET() to determine the fd state, but this is not guaranteed to be either 0 of FD_CLOEXEC. Make that explicit. Also, the argument of set_close_on_exec() is being AND'ed with the literal constant 1. Make it use an explicit FD_CLOEXEC test.
Showing
Please register or sign in to comment