ioctl
Rob Warnock
rpw3 at rigden.wpd.sgi.com
Thu May 23 13:20:58 AEST 1991
In article <105553 at sgi.sgi.com> I wrote:
+-+-------------
| | an ioctl call is giving me an "Invalid argument error". The
| | call looks like this:
| | if (ioctl(trackerPtr->fileDescriptor, FIONREAD, &charsToRead) < 0)
| +---------------
| ... I just checked, and on Irix 3.3.2, FIONREAD is not supported on
| pipes or plain files. You get errno=25.
+---------------
As a work-around, you might try using select() in polling mode as a (partial)
replacement for icotl(,FIONREAD,). A select() "poll" can be done by providing
a "timeout" argument (a pointer to a "struct timeval"), but making the "timval"
structure pointed to contain all zeros. See the select(2) man page.
-Rob
-----
Rob Warnock, MS-1L/515 rpw3 at sgi.com rpw3 at pei.com
Silicon Graphics, Inc. (415)335-1673 Protocol Engines, Inc.
2011 N. Shoreline Blvd.
Mountain View, CA 94039-7311
More information about the Comp.sys.sgi
mailing list