From a743e3b94089a13f47b3294e91027cecbf29fe0f Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 5 Sep 2005 17:30:04 +0000 Subject: * cygheap.cc (cygheap_init): Eliminate debugging #if. * fork.cc (fork_parent): Don't issue errors if "somebody" has set the PID_EXITED flag on a child. Don't close process handle if it has potentially already been closed. * pinfo.cc (winpids::add): Eliminate PID_ALLPIDS handling which was obsoleted by previous changes. * spawn.cc (av::fixup): Do win16 detection for .com files. Make sure that buffer has been unmapped in all cases. --- winsup/cygwin/spawn.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'winsup/cygwin/spawn.cc') diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 39402182a..e2c3decf5 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -1020,7 +1020,9 @@ av::fixup (child_info_types chtype, const char *prog_arg, path_conv& real_path, { /* If the file name ends in either .exe, .com, .bat, or .cmd we assume that it is NOT a script file */ - while (*ext == '\0' || chtype == PROC_SPAWN || (wincap.detect_win16_exe () && strcasematch (ext, ".exe"))) + while (*ext == '\0' || chtype == PROC_SPAWN + || (wincap.detect_win16_exe () && (strcasematch (ext, ".exe") + || strcasematch (ext, ".com")))) { HANDLE h = CreateFile (real_path, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, @@ -1053,6 +1055,7 @@ av::fixup (child_info_types chtype, const char *prog_arg, path_conv& real_path, if (real_path.has_acls () && allow_ntsec && check_file_access (real_path, X_OK)) { + UnmapViewOfFile (buf); debug_printf ("... but not executable"); break; } -- cgit v1.2.3