Fix s2n_fd_set_blocking to be a no-op on already blocking pipe
Previously s2n_fd_set_blocking xor-ed the O_NONBLOCK, which resulted in
flipping back to non-blocking mode if fd was already in blocking mode.
int s2n_fd_set_blocking(int fd) {
- return fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) ^ O_NONBLOCK);
+ return fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) & ~O_NONBLOCK);
}
int s2n_fd_set_non_blocking(int fd) {
