Check to see if a read is likely to succeed
#include <unix.h> int rdchk( int fd );
libc
The rdchk() function checks to see if a read from the file descriptor, fd, is likely to succeed.
The number of characters waiting to be read, or -1 if an error occurred.
| Safety: | |
|---|---|
| Cancellation point | No |
| Interrupt handler | No |
| Signal handler | Yes |
| Thread | Yes |