This repository has been archived by the owner on May 4, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
darwin, freebsd: use ioctl(FIOCLEX) and ioctl(FIONBIO)
Set the non-blocking and close-on-exec flags with ioctl() instead of fcntl(), it's about 10-25% faster. Stick with fcntl() on Solaris. ioctl(FIONBIO) works but is twice as slow as fcntl(O_NONBLOCK). ioctl(FIOCLEX) doesn't raise an error but doesn't actually work either.
- Loading branch information