When Windows programs called MSYS2/Cygwin programs argv[] handling
was something of a mess. It's still a bit of a mess, but at least
it works for the more common use-cases [*].
Mainly, if globify () detected an argument that looked like a dos
path ('C:', '"C:' or \\) then it wouldn't handle proceeding literal,
escaped quotes correctly (the " got dumped, while the \ remained).
Also, strace was setting env. var MSYS="noglob" and I can't figure
out why. This made investigating the globify () problem a lot more
difficult than it should've been.
Finally, build_argv conflated winshell with (winshell && allow_glob)
when they should be orthogonal.
Also added a bunch of debug_printf () calls.
[*] It's possible that I broke the corner-case of:
'"C:\some\quoted\\"folder with spaces\"\may\not\work"'
.. in order to support:
"C:/some/quoted/\"folder with spaces\"/now/does/work"'
.. so I might revisit this soon.
25 lines
719 B
Diff
25 lines
719 B
Diff
From 8d4c1ebb7911c49c927cf1d2ad88397cb6cba2e1 Mon Sep 17 00:00:00 2001
|
|
From: Ray Donnelly <mingw.android@gmail.com>
|
|
Date: Fri, 21 Aug 2015 09:52:47 +0100
|
|
Subject: [PATCH 5/5] Add debugging for strace make_command_line
|
|
|
|
---
|
|
winsup/utils/strace.cc | 1 +
|
|
1 file changed, 1 insertion(+)
|
|
|
|
diff --git a/winsup/utils/strace.cc b/winsup/utils/strace.cc
|
|
index dc3ef55..ead4c04 100644
|
|
--- a/winsup/utils/strace.cc
|
|
+++ b/winsup/utils/strace.cc
|
|
@@ -353,6 +353,7 @@ create_child (char **argv)
|
|
flags |= CREATE_NEW_CONSOLE | CREATE_NEW_PROCESS_GROUP;
|
|
|
|
make_command_line (one_line, argv);
|
|
+ printf ("create_child: %s\n", one_line.buf);
|
|
|
|
SetConsoleCtrlHandler (NULL, 0);
|
|
/* Commit message for this code was:
|
|
--
|
|
2.5.0
|
|
|