Can anyone help me construct a call to ioctl
! ioctl
to accomplish the below Linux Call?
The following ioctl(2) operation, which can be applied to a file descriptor that refers to either end of a pipe, places a count of the number of unread bytes in the pipe in the int buffer pointed to by the final argument of the call: ioctl(fd, FIONREAD, &nbytes); The FIONREAD operation is not specified in any standard, but is provided on many implementations.