[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 02/11: remove 2nd attempt at invoking ComSpec when spawn
From: |
Mike Gran |
Subject: |
[Guile-commits] 02/11: remove 2nd attempt at invoking ComSpec when spawning child |
Date: |
Sun, 24 Jan 2021 01:28:47 -0500 (EST) |
mike121 pushed a commit to branch mingw-guile-3.0
in repository guile.
commit c1f0019b5b5cb8bc4cb65a3bab75a2f5976bf5e5
Author: Michael Gran <spk121@yahoo.com>
AuthorDate: Fri Jan 22 20:49:04 2021 -0800
remove 2nd attempt at invoking ComSpec when spawning child
The start_child procedure is used to spawn a child process. If it fails
to launch the given argv[0] as if it were a command, it has logic to
retry using the ComSpec as a command interpreter, treating argv[0] as
a batch file name. Usually, this fails because batch files would have
been handled in the first pass if they were valid. Also, this has
the unfortunate side effect of spawning a shell awaiting user input.
It is safer to remove this attempt.
* libguile/posix-w32.c (start_child): remove fallback processing
---
libguile/posix-w32.c | 18 +-----------------
1 file changed, 1 insertion(+), 17 deletions(-)
diff --git a/libguile/posix-w32.c b/libguile/posix-w32.c
index e4a03eb..6302eec 100644
--- a/libguile/posix-w32.c
+++ b/libguile/posix-w32.c
@@ -1,4 +1,4 @@
-/* Copyright 2001,2006,2008,2016,2018
+/* Copyright 2001,2006,2008,2016,2018,2021
Free Software Foundation, Inc.
This file is part of Guile.
@@ -740,22 +740,6 @@ start_child (const char *exec_file, char **argv,
CloseHandle (herr);
CloseHandle (pi.hThread);
- /* Posix requires to call the shell if execvp fails to invoke EXEC_FILE. */
- if (errno_save == ENOEXEC || errno_save == ENOENT)
- {
- const char *shell = getenv ("ComSpec");
-
- if (!shell)
- shell = "cmd.exe";
-
- if (c_strcasecmp (exec_file, shell) != 0)
- {
- argv[0] = (char *)exec_file;
- return start_child (shell, argv, reading, c2p, writing, p2c,
- infd, outfd, errfd);
- }
- }
-
errno = errno_save;
return pid;
}
- [Guile-commits] branch mingw-guile-3.0 created (now c8990b7), Mike Gran, 2021/01/24
- [Guile-commits] 01/11: disable popen 'no duplicates' test for MinGW, Mike Gran, 2021/01/24
- [Guile-commits] 03/11: Add Win32 compatibility to JIT, Mike Gran, 2021/01/24
- [Guile-commits] 05/11: ice-9 ftw: handle missing getuid and getgid, Mike Gran, 2021/01/24
- [Guile-commits] 07/11: ftw test should handle missing symlink procedure, Mike Gran, 2021/01/24
- [Guile-commits] 04/11: On Win32, prefer winsock2 header for socket declarations, Mike Gran, 2021/01/24
- [Guile-commits] 06/11: ice-9 ftw: handle non-working inodes, Mike Gran, 2021/01/24
- [Guile-commits] 08/11: Let read-line handle alternate line endings, Mike Gran, 2021/01/24
- [Guile-commits] 02/11: remove 2nd attempt at invoking ComSpec when spawning child,
Mike Gran <=
- [Guile-commits] 09/11: Let suspendable ports' read-line handle alternate line endings, Mike Gran, 2021/01/24
- [Guile-commits] 10/11: simplify reading http headers using updated %read-line, Mike Gran, 2021/01/24
- [Guile-commits] 11/11: For MinGW use Windows filepaths in libpath.h, Mike Gran, 2021/01/24