select() blocks

Levente leventelist@gmail.com
Mon Apr 23 09:41:00 GMT 2018


Dear List,


I'd like to ask a question before I file a bug report.

I'm monitoring a file descriptor with select(). The file descriptor is
connected to a serial port, which is in reality a USB-serial
converter. When calling select() with a finite timeout, and
disconnecting the USB-serial converter, select() blocks forever.

Is this intentional?

I have this select() call:

            ret = select(serial->fd+1, &rfds, NULL, NULL, &tv_timeout);

I'm on a Debian stable, using libc-bin version 2.24-11+deb9u3. I have
similar issue on OpenWRT.


Thanks,
Levente



More information about the Libc-help mailing list