aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/spawn.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index 5aa52ab..4fc842a 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -215,6 +215,8 @@ handle (int fd, bool writing)
static bool
is_console_app (WCHAR *filename)
{
+ if (filename == NULL)
+ return true; /* The command executed is command.com or cmd.exe. */
HANDLE h;
const int id_offset = 92;
h = CreateFileW (filename, GENERIC_READ, FILE_SHARE_READ,