in reply to Using select() on only one socket

I see you solved your problem, but thought I'd mention this anyway since so few people realize it.

When select() says a file descriptor is readable it really means that it *might* be readable. You still have to use nonblocking I/O to be sure you won't block.

Replies are listed 'Best First'.
Re^2: Using select() on only one socket
by polettix (Vicar) on Sep 04, 2005 at 16:31 UTC
    This is not correct: the whole point of can_read is that it tells you that there's data waiting to be read in the filehandles it returns. Probably you're referring to some particular environment or operating system I'm not considering at the moment?

    Flavio
    perl -ple'$_=reverse' <<<ti.xittelop@oivalf

    Don't fool yourself.