[Haskell-cafe] fcntl locks, executeFile and threaded runtime

Donn Cave donn at avvanta.com
Wed Oct 30 14:35:10 UTC 2013


While I'm grasping at straws, might as well mention that the
threaded runtime uses signals, lots of signals, and that can
break things that are interruptible and haven't been adequately
signal-proofed.  For example, earlier in this exchange I included
a short program that uses System.Posix.Unistd.sleep, and on
MacOS anyway, that breaks with -threaded -- the sleep doesn't
sleep for any appreciable time before it gets interrupted by
the flood of runtime ALRM signals.

I can't account for any obvious reason why signal interrupts
could cause the present problem, but it's easy enough to test
if you're curious - just compile with -rtsopts, and pass the
-V0 flag to the runtime.  (E.e.g., ./a.out +RTS -V0 -RTS,
GHCRTS=-V0 ./a.out, ...)

	Donn


More information about the Haskell-Cafe mailing list