fixup! mingw: spawned processes need to inherit only standard handles

When we suppress the warning that we could not restrict file handle
inheritance because of known error conditions, we should really suppress
the *entire* warning, not just parts of it.

This was reported in
https://github.com/git-for-windows/git/issues/1578#issuecomment-375692983

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin
2018-03-23 23:38:07 +01:00
parent 5d726e05e4
commit f2a677fb4d

View File

@@ -1793,7 +1793,7 @@ static pid_t mingw_spawnve_fd(const char *cmd, const char **argv, char **deltaen
ret = CreateProcessW(*wcmd ? wcmd : NULL, wargs, NULL, NULL,
TRUE, flags, wenvblk, dir ? wdir : NULL,
&si.StartupInfo, &pi);
if (ret) {
if (ret && buf.len) {
errno = err_win_to_posix(GetLastError());
warning("failed to restrict file handles (%ld)\n\n%s",
err, buf.buf);