Operating systems, development tools, and professional services
for connected embedded systems
for connected embedded systems
![]() |
![]() |
![]() |
![]() |
rdchk()
Check to see if a read is likely to succeed
Synopsis:
#include <unix.h> int rdchk( int fd );
Arguments:
- fd
- The file descriptor that you want to check.
Library:
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). |
Description:
The rdchk() function checks to see if a read from the file descriptor, fd, is likely to succeed.
Returns:
The number of characters waiting to be read, or -1 if an error occurred (errno is set).
Errors:
- ENOTTY
- The fd argument isn't the file descriptor for a character device.
Classification:
| Safety: | |
|---|---|
| Cancellation point | No |
| Interrupt handler | No |
| Signal handler | Yes |
| Thread | Yes |
See also:
![]() |
![]() |
![]() |
![]() |

![[Previous]](../prev.gif)
![[Contents]](../contents.gif)
![[Index]](../keyword_index.gif)
![[Next]](../next.gif)
