![]()  | 
![]()  | 
![]()  | 
![]()  | 
![]()  | 
This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. | 
Check to see if a read is likely to succeed
#include <unix.h> int rdchk( int fd );
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
![]()  | 
This function is in libc.a, but not in libc.so (in order to save space). | 
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 (errno is set).
| Safety: | |
|---|---|
| Cancellation point | No | 
| Interrupt handler | No | 
| Signal handler | Yes | 
| Thread | Yes | 
![]()  | 
![]()  | 
![]()  | 
![]()  |