[Prev][Next][Index][Thread]

Re: Fcntl



> From: Ravi Chamarty <ravi@ittc.ukans.edu>
> Subject: Fcntl
> Date: Sun, 27 May 2001 17:30:55 -0500 (CDT)
> 
> Can the following implementation run on OSKit? I tried linking in the
> POSIX library (liboskit_posix.a). But it did not work.

Very little of the fcntl sys call is implemented. Take a look at
posix/sys/fcntl.c to see what is. Basically, the OSKit does not contain
enough of a "process" model to support most of the fcntl commands correctly
or completely. Some of the missing commands could be partially implemented,
but no one has taken the time to do that.

With that said, if you are trying to do nonblocking I/O on a socket, then
look at the setockopt (SO_SNDTIMEO and SO_RCVTIMEO options). You can also
try ioctl(FIONREAD) (which is a nonblocking check to see how much data is
available for reading); some of the IO groups support that too. Or more
traditionally, use "select" to poll for read/write.

Good Luck!

Lbs

----------------------------------------
Leigh B. Stoller
University of Utah - Flux Research Group
http://www.cs.utah.edu/~stoller
----------------------------------------

References: