Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mingw: work around incorrect standard handles
For some reason, when being called via TortoiseGit the standard handles can take on the value (HANDLE)-2 (which is not a legal value, according to the documentation). Nevertheless, CreateProcess() works with hStdInput set to this value. But our new code to restrict which file handles get inherited by spawned processes apparently does *not* work with such values, erroring out with `ERROR_INVALID_PARAMETER`. Let's just disallow "negative" handles, and hopefully this will work around the issue. This addresses git-for-windows#1481 Signed-off-by: Johannes Schindelin <[email protected]>
- Loading branch information