Close original pipe fd in subprocesses
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.

bradking/ninja,mydongistiny/ninja,sxlin/dist_ninja,fuchsia-mirror/third_party-ninja,ninja-build/ninja,iwadon/ninja,nicolasdespres/ninja,mydongistiny/ninja,nico/ninja,Qix-/ninja,Qix-/ninja,moroten/ninja,iwadon/ninja,martine/ninja,atetubou/ninja,lizh06/ninja,martine/ninja,sgraham/ninja,maruel/ninja,AoD314/ninja,mydongistiny/ninja,fuchsia-mirror/third_party-ninja,maruel/ninja,bradking/ninja,juntalis/ninja,sgraham/ninja,nicolasdespres/ninja,maruel/ninja,ndsol/subninja,sgraham/ninja,nico/ninja,moroten/ninja,martine/ninja,martine/ninja,nafest/ninja,sgraham/ninja,atetubou/ninja,ndsol/subninja,Maratyszcza/ninja-pypi,fuchsia-mirror/third_party-ninja,AoD314/ninja,atetubou/ninja,sxlin/dist_ninja,bradking/ninja,sxlin/dist_ninja,mydongistiny/ninja,fuchsia-mirror/third_party-ninja,lizh06/ninja,ninja-build/ninja,nicolasdespres/ninja,Maratyszcza/ninja-pypi,sxlin/dist_ninja,nafest/ninja,moroten/ninja,juntalis/ninja,Maratyszcza/ninja-pypi,AoD314/ninja,atetubou/ninja,nicolasdespres/ninja,moroten/ninja,ndsol/subninja,juntalis/ninja,Qix-/ninja,juntalis/ninja,iwadon/ninja,maruel/ninja,sxlin/dist_ninja,bradking/ninja,Maratyszcza/ninja-pypi,Qix-/ninja,ninja-build/ninja,nafest/ninja,nico/ninja,nafest/ninja,ninja-build/ninja,AoD314/ninja,lizh06/ninja,nico/ninja,iwadon/ninja,ndsol/subninja,sxlin/dist_ninja,lizh06/ninja,sxlin/dist_ninja