2 Mar
2006
2 Mar
'06
14:19
Anders Johansson wrote:
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);
Ahhh ... ok, that does it. Takker. I guess the easiest is to go nonblocking throughout - except why can't I rely on fputs()/fprintf() sticking something useful into errno? It seems reasonable that an fputs() could return -1 and errno==EAGAIN. Sorry, just thinking out loud. Maybe I'll do what you suggested - change blocking whenver I need to - just sounds a bit kludgy. /Per Jessen, Zürich