kili at outback.escape.de
Wed Apr 14 14:44:29 EDT 2010
On Fri, Apr 09, 2010 at 05:48:17PM +0400, Serge D. Mechveliani wrote:
> I have tested ghc-126.96.36.19900330 on Debian Linux, i386-family,
> on the DoCon test, without profilig.
> It looks all right.
Even if I reported to Ian that everything is fine on OpenBSD, I
just found some strangeness with openBinaryFile and runProcess when
testing darcs-2.4 built with the (still not really released)
ghc-6.12.2. Here's a small test program:
module Main(main) where
main = do
hin <- openBinaryFile "/dev/null" ReadMode
hp <- runProcess "/bin/ls" ["-l"] Nothing Nothing (Just hin) Nothing Nothing
r <- waitForProcess hp
IF I run this on OpenBSD (amd64), I get
foo: /bin/ls: runProcess: unsupported operation (Operation not supported by device)
Tracing the process shows the following hints (File handle 0x6 is the
one from /dev/null):
25151 foo CALL ioctl(0x6,TIOCGETA,0x7f7ffffe1da0)
25151 foo RET ioctl -1 errno 19 Operation not supported by device
25151 foo CALL fcntl(0x6,0x4,0x4)
25151 foo RET fcntl -1 errno 19 Operation not supported by device
I'm not sure about the ioctl call, but the fcntl tries to set the
handle to nonblocking mode. There's already some comment about this
(on FreeBSD) in the code, but I'm unsuere what exactly to do about
I'd really like to see the result of this program on FreeBSD and/or
NetBSD, so we know wether it's specific to OpenBSD or wether it
happens on all BSD-like systems.
ps: GHC guys, please don't let this stop you from going on with the
ghc-6.12.2 release process. Problems like this can be easily fixed
by package maintainers.
More information about the Glasgow-haskell-users