2 Mar
2006
2 Mar
'06
20:03
Per Jessen wrote:
Anders Johansson wrote:
No, see "man dup". The file status flags are shared between the two, so a change to one means both are affected. The file descriptor flags are not.
Hmm. Any suggestion on how to do nonblocking reads and blokcing writes on one socket?
At what point do you do the GET_FL? I don't see it in the code you sent
I think I removed it again. I basically did a check just before fputs(). Something like this:
fcntl( fd, F_GETFL, &flag ); if ( flag & O_NONBLOCK ) log_error("nonblocking when it shudnt be");
by the way, this isn't a valid call. flag doesn't get modified by this. Correct would be flag=fcntl(fd, F_GETFL);