Skip to content

Commit f2a677f

Browse files
committed
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 #1578 (comment) Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 5d726e0 commit f2a677f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compat/mingw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1793,7 +1793,7 @@ static pid_t mingw_spawnve_fd(const char *cmd, const char **argv, char **deltaen
17931793
ret = CreateProcessW(*wcmd ? wcmd : NULL, wargs, NULL, NULL,
17941794
TRUE, flags, wenvblk, dir ? wdir : NULL,
17951795
&si.StartupInfo, &pi);
1796-
if (ret) {
1796+
if (ret && buf.len) {
17971797
errno = err_win_to_posix(GetLastError());
17981798
warning("failed to restrict file handles (%ld)\n\n%s",
17991799
err, buf.buf);

0 commit comments

Comments
 (0)