D-Programming-Language/phobos — pull request #2326 by kyllingstad (2014-07-11 19:18:41+00:00)
Title: Fix issue #13100 - std.process.setCLOEXEC() throws on invalid file descriptor

There are two cases in which the `fcntl()` calls may fail:

1) the file descriptor is invalid, in which case `errno == EBADF`,
2) they receive invalid arguments, in which case `errno == EINVAL`.

We just want to ignore the error in the former case, as evidenced by the bug report, and the latter means that we have an error in `std.process`, which is best handled by an assertion. (Note that it was never possible to catch the exception anyway, since it was thrown in the child process.)