Skip to content

Commit

Permalink
fixup! mingw: spawned processes need to inherit only standard handles
Browse files Browse the repository at this point in the history
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 <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Mar 23, 2018
1 parent 5d726e0 commit f2a677f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compat/mingw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f2a677f

Please sign in to comment.