[Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.187.2.3,2.187.2.4
Anthony Baxter
anthonybaxter@users.sourceforge.net
Sun, 07 Apr 2002 21:42:12 -0700
Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv18851/Modules
Modified Files:
Tag: release21-maint
posixmodule.c
Log Message:
Backport of bug
457466: "popenx() argument mangling hangs python" [Win9x only]."
Can't test this myself, but MarkH sez it's ok.
Index: posixmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v
retrieving revision 2.187.2.3
retrieving revision 2.187.2.4
diff -C2 -d -r2.187.2.3 -r2.187.2.4
*** posixmodule.c 11 Jul 2001 22:27:38 -0000 2.187.2.3
--- posixmodule.c 8 Apr 2002 04:42:09 -0000 2.187.2.4
***************
*** 2423,2429 ****
s2 = (char *)_alloca(x);
ZeroMemory(s2, x);
sprintf(
s2,
! "%s \"%s%s%s\"",
modulepath,
s1,
--- 2423,2435 ----
s2 = (char *)_alloca(x);
ZeroMemory(s2, x);
+ /* To maintain correct argument passing semantics,
+ we pass the command-line as it stands, and allow
+ quoting to be applied. w9xpopen.exe will then
+ use its argv vector, and re-quote the necessary
+ args for the ultimate child process.
+ */
sprintf(
s2,
! "\"%s\" %s%s%s",
modulepath,
s1,