[phobos] [D-Programming-Language/phobos] bed2df: Avoid brute force fd close() on Linux

GitHub via phobos phobos at puremagic.com
Mon Apr 4 11:45:36 PDT 2016


  Branch: refs/heads/master
  Home:   https://github.com/D-Programming-Language/phobos
  Commit: bed2df7e804005830e14d323f31fc1ed09c0a3bf
      https://github.com/D-Programming-Language/phobos/commit/bed2df7e804005830e14d323f31fc1ed09c0a3bf
  Author: Matt Kline <matt at bitbashing.io>
  Date:   2016-04-04 (Mon, 04 Apr 2016)

  Changed paths:
    M changelog.dd
    M std/process.d

  Log Message:
  -----------
  Avoid brute force fd close() on Linux

The current Posix implementation of spawnProcess calls close on
every fd from 3 to the max fd count (as gathered by rlimit()).
Given that the process doesn't have that many descriptors open
in the *vast* majority of cases, this is quite pessimal.

Instead, use poll() to see which descriptors are actually open,
and close those.


  Commit: 5bdc3b3a5dbb2fa699d23b6157c39f9b7e7a76c7
      https://github.com/D-Programming-Language/phobos/commit/5bdc3b3a5dbb2fa699d23b6157c39f9b7e7a76c7
  Author: Steven Schveighoffer <schveiguy at yahoo.com>
  Date:   2016-04-04 (Mon, 04 Apr 2016)

  Changed paths:
    M changelog.dd
    M std/process.d

  Log Message:
  -----------
  Merge pull request #4114 from mrkline/improved-linux-spawn-process

Avoid brute force fd close() on Linux


Compare: https://github.com/D-Programming-Language/phobos/compare/df99fc87075c...5bdc3b3a5dbb


More information about the phobos mailing list