[Haskell-cafe] Discussion: The CLOEXEC problem

Mike Meyer mwm at mired.org
Mon Jul 20 13:57:15 UTC 2015


This is just one example of the general problem of fork()'ing with threads
holding a lock.  Given that locks come in different flavors and have
different uses, they need individual handling. The best general solution I
know of is "don't do that". One of the things I like about Haskell is that
the type system gives me hints when I'm trying to do that.

That said, there are a number of issues raised by leaving FD's open across
an exec, and that's rarely the right thing to do. So making it the default
behavior is probably a good idea.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20150720/58196fcb/attachment.html>


More information about the Haskell-Cafe mailing list