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>2006-04-13 05:37:00 +0400
committerChristopher Faylor <me@cgf.cx>2006-04-13 05:37:00 +0400
commit2e9d484382fe45ff1dcd325be0992b1857f9498d (patch)
tree7f5255426ee768252260a908ffd9bec6cf87b108 /winsup/cygwin/spawn.cc
parenta5eaf568177c2d765f704490eb56628e9cec653d (diff)
* spawn.cc (spawn_guts): Revert patch which treated derived cygwin programs
differently from those which are mounted with -X. Pass extra argument to linebuf::fromargv. * winf.h (MAXCYGWINCMDLEN): New define. (linebuf::finish): Add a new argument denoting when command line overflow is ok. (linebuf::fromargv): Ditto. * winf.cc (linebuf::finish): Implement above change. (linebuf::fromargv): Ditto.
Diffstat (limited to 'winsup/cygwin/spawn.cc')
-rw-r--r--winsup/cygwin/spawn.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index 9d358da0c..a39145ed8 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -347,6 +347,7 @@ spawn_guts (const char * prog_arg, const char *const *argv,
goto out;
}
+ bool wascygexec = real_path.iscygexec ();
res = newargv.fixup (prog_arg, real_path, ext);
if (res)
@@ -371,9 +372,9 @@ spawn_guts (const char * prog_arg, const char *const *argv,
}
else
{
- if (real_path.iscygexec ())
+ if (wascygexec)
newargv.dup_all ();
- else if (!one_line.fromargv (newargv, real_path))
+ else if (!one_line.fromargv (newargv, real_path, real_path.iscygexec ()))
{
res = -1;
goto out;
@@ -461,6 +462,7 @@ spawn_guts (const char * prog_arg, const char *const *argv,
cygheap->fdtab.set_file_pointers_for_exec ();
+ ch.set (chtype, real_path.iscygexec ());
moreinfo->envp = build_env (envp, envblock, moreinfo->envc, real_path.iscygexec ());
if (!moreinfo->envp || !envblock)
{
@@ -468,7 +470,6 @@ spawn_guts (const char * prog_arg, const char *const *argv,
res = -1;
goto out;
}
- ch.set (chtype, real_path.iscygexec ());
ch.moreinfo = moreinfo;
si.lpReserved2 = (LPBYTE) &ch;