From: holly@random.ZAIT.Uni-Bremen.DE (Holger Duerer - Esperanto parolata)
Olin> What do you want to do? fcntl(2) isn't a specific thing, it's
Olin> more of a grab bag. Scsh does file locking with file-locking
Olin> procedures, duping with duping procedures. What's left, in
Olin> POSIX, is getting status flags off of file descriptors. I
Olin> don't provide this. I should. Do you need it?
As I read from W. Richard Steven's book (``Advanced Programming in the
Unix Environment''), ioctl is not POSIX but supported by BSD and SYSV.
Useful things you haven't mentioned might be reading/setting file
modes (asynch, blocking, append) and setting/clearing the CLOEXEC
flag. (The BSDish querying/setting of owner process is probably too
specific (i.e. unportable) to merit its inclusion.)
Nope -- asynch/blocking/append/cloexec is all done with fcntl.
I'll try and get that hacked in by the next release.
Note that cloexec sort of already comes for free with scsh. If you
have a port open on a Unix file descriptor, and you don't ask scsh
what is the actual value of the file descriptor (i.e., the port remains
"unrevealed"), then when you exec a process from scsh, the port gets
closed on exec. This is most ports.
-Olin
|