diff options
author | Christopher Faylor <me@cgf.cx> | 2005-09-05 17:30:04 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-09-05 17:30:04 +0000 |
commit | a743e3b94089a13f47b3294e91027cecbf29fe0f (patch) | |
tree | e60d29c389beb2a11a62a1dfb50d4fe69ab5059a /winsup/cygwin/spawn.cc | |
parent | bf58ec35b4e79aa656b057bc754b64fe39e270da (diff) | |
download | cygnal-a743e3b94089a13f47b3294e91027cecbf29fe0f.tar.gz cygnal-a743e3b94089a13f47b3294e91027cecbf29fe0f.tar.bz2 cygnal-a743e3b94089a13f47b3294e91027cecbf29fe0f.zip |
* 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.
Diffstat (limited to 'winsup/cygwin/spawn.cc')
-rw-r--r-- | winsup/cygwin/spawn.cc | 5 |
1 files changed, 4 insertions, 1 deletions
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; } |