Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2000-11-20 22:35:45 +0300
committerChristopher Faylor <me@cgf.cx>2000-11-20 22:35:45 +0300
commit099efae038316c57af95c01abddaf246e3b6028d (patch)
treea663fe07d6ccaff68d04eefed2ceed71d1658952 /winsup/cygwin/spawn.cc
parent975aa482436a4d4e48c070afb7bd63fa8e4c0b71 (diff)
* spawn.cc (spawn_guts): YA tweak for dealing with arcane rules of quoting in
"normal" Microsoft programs. * child_info.h: Bump fork magic number. * include/sys/mount.h: Add an entry for mixed mode.
Diffstat (limited to 'winsup/cygwin/spawn.cc')
-rw-r--r--winsup/cygwin/spawn.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index 097ecedc9..211c15c04 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -483,7 +483,12 @@ spawn_guts (HANDLE hToken, const char * prog_arg, const char *const *argv,
for (; (p = strpbrk (a, "\"\\")); a = ++p)
{
one_line.add (a, p - a);
- if ((*p == '\\' && p[1] == '"') || *p == '"')
+ if (*p == '\\' && p[1] == '\\')
+ {
+ one_line.add ("\\\\\\", 3);
+ p++;
+ }
+ else if ((*p == '\\' && p[1] == '"') || *p == '"')
one_line.add ("\\", 1);
one_line.add (p, 1);
}