[phobos] [D-Programming-Language/phobos] b7af42: Fix issue #13100 - std.process.setCLOEXEC() throws

GitHub via phobos phobos at puremagic.com
Fri Jul 11 17:10:39 PDT 2014


  Branch: refs/heads/master
  Home:   https://github.com/D-Programming-Language/phobos
  Commit: b7af42bafa7f4cdae415daf0d1e5bb212a40bd88
      https://github.com/D-Programming-Language/phobos/commit/b7af42bafa7f4cdae415daf0d1e5bb212a40bd88
  Author: Lars T. Kyllingstad <git at kyllingen.net>
  Date:   2014-07-11 (Fri, 11 Jul 2014)

  Changed paths:
    M std/process.d

  Log Message:
  -----------
  Fix issue #13100 - std.process.setCLOEXEC() throws

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.)


  Commit: 357b627d2b7349c5fae8fc336f988242cd9fd51f
      https://github.com/D-Programming-Language/phobos/commit/357b627d2b7349c5fae8fc336f988242cd9fd51f
  Author: Михаил Страшун <public at dicebot.lv>
  Date:   2014-07-12 (Sat, 12 Jul 2014)

  Changed paths:
    M std/process.d

  Log Message:
  -----------
  Merge pull request #2326 from kyllingstad/no-setcloexec-fail

Fix issue #13100 - std.process.setCLOEXEC() throws on invalid file descriptor


Compare: https://github.com/D-Programming-Language/phobos/compare/911ea3144397...357b627d2b73


More information about the phobos mailing list