Commit 868c7ce
committed
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 <johannes.schindelin@gmx.de>1 parent 0922cb3 commit 868c7ce
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1662 | 1662 | | |
1663 | 1663 | | |
1664 | 1664 | | |
1665 | | - | |
| 1665 | + | |
1666 | 1666 | | |
1667 | | - | |
| 1667 | + | |
1668 | 1668 | | |
1669 | 1669 | | |
1670 | | - | |
| 1670 | + | |
1671 | 1671 | | |
1672 | 1672 | | |
1673 | 1673 | | |
| |||
0 commit comments