[Haskell-cafe] Discussion: The CLOEXEC problem

Donn Cave donn at avvanta.com
Thu Jul 23 16:33:27 UTC 2015


Quoth David Turner <dave.c.turner at gmail.com>,
...
> Non-inheritable-by-default makes sense to me - if you forget to clear
> FD_CLOEXEC when you meant to then your program breaks loudly and obviously;

This is where we differ.  First, it isn't fair to say we "forget"
to clear FD_CLOEXEC, if in pre-existing software we didn't have a
CLOEXEC bit to clear.  Rather, in the existing set of applications
that have an exec - whether in Haskell code or not - we can expect
that some subset of them will start to behave differently.  Maybe
behave better, but in any case likely a surprise to everyone because
we've reversed the default on some large subset of file descriptors.
And I think it's very optimistic to predict that the breakage will
be obvious - the obvious effects will naturally be obvious, but
I personally am not up to accounting for all non-obvious cases.

And there's the other FDs - inherited, non-Haskell, sockets - so
we still need another solution if we're serious about fixing
the problem.

	Donn


More information about the Haskell-Cafe mailing list