Christophe Rhodes <csr21@...> writes:
> Thanks. I've implemented a slightly different binding (inspired by
> Vincent Arkesteijn's ioctl()) in sbcl-0.8.7.36 -- there exist three
> possible variants for fcntl(), hidden behind a wrapper with signature
> sb-posix:fcntl (fd command &optional arg) where arg, if present, can
> be an integer, an alien pointer, or an int.
Thanks. That works fine.
> Let me know if this doesn't work for you (I'm presuming that it's not
> terribly easy to test fcntl() in a regression test, but if it is
> possible to set up an elementary test or two in ten lines or so of
> code, that would be very helpful).
Below is a very simple test. I wasn't able to produce a test
involving O_ASYNC and SIGIO, but I discover that the F_GETFL was
missing. Could you add F_GETFL to the constants? Thanks.
(let ((fd (sb-posix:open "/dev/null" sb-posix::o-nonblock)))
(= (sb-posix:fcntl fd sb-posix::f-getfl) sb-posix::o-nonblock))