I’m using ioctl() to check if the read-end of a pipe would block. I set ioctl(the_pipe[0], FIONBIO, ...) (I’m not sure what the 3rd parameter is supposed to be, can I set it to NULL?).
As I understand, read(the_pipe[0], buf, buf_len); is supposed to set an error code for EWOULDBLOCK (EAGAIN), but where is that error code set, how do I get it?
Thanks
errnois available after having includederrno.h