summaryrefslogtreecommitdiffstats
path: root/HACKING.md
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2017-01-13 04:53:01 (GMT)
committerColin Cross <ccross@android.com>2017-01-13 04:59:31 (GMT)
commitdd2b587e289603127f30ea296e7751e4cf90fe7d (patch)
treec10059f621c47af4b26b27060dbd54a196b3cf5d /HACKING.md
parenta36f96c0a5ae3b204065ac8560410104cefcfa2f (diff)
downloadNinja-dd2b587e289603127f30ea296e7751e4cf90fe7d.zip
Ninja-dd2b587e289603127f30ea296e7751e4cf90fe7d.tar.gz
Ninja-dd2b587e289603127f30ea296e7751e4cf90fe7d.tar.bz2
Close original pipe fd in subprocesses
Non-console subprocesses have the write end of a pipe connected to fds 1 and 2 for stdout and stderr, but they also have the it connected to whatever fd was assigned in the ninja process when the pipe was created. Add a call to posix_spawn_file_actions_addclose after the posix_spawn_file_actions_adddup2 calls to close the original fd once it has been dup'd to stdout and stderr. This fixes an issue seen in the Android build, where one of the subprocesses is used to start a background helper process. The background process attempts to close any inherited fds, but if ninja used a very large fd number due to a high parallelism count the background process would not close the fd and ninja would never consider the subprocess finished.
Diffstat (limited to 'HACKING.md')
0 files changed, 0 insertions, 0 deletions