in reply to nonblocking socket back to blocking

O_NONBLOCK is a bit-flag. To unset it, try:

fcntl(fd, F_SETFL, ~O_NONBLOCK)

Whether that will work probably depends upon which interpretation of POSIX your system thinks it's complying to.

You might want to query the current setting and just remove the nonblock bit.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."