A recent thread on the Subversion list concerned passing empty
parameters, i.e. a "" string, to apr_proc_create; it appears that APR
causes such parameters to disappear on Windows:
http://svn.haxx.se/dev/archive-2005-09/1142.shtml
There was a claim that CreateProcess supports "":
http://svn.haxx.se/dev/archive-2005-09/1131.shtml
I not a Windows expert, and I don't have a Windows box to test, but
this patch should cause APR to pass "":
Index: threadproc/win32/proc.c
===================================================================
--- threadproc/win32/proc.c (revision 325972)
+++ threadproc/win32/proc.c (working copy)
@@ -460,7 +460,7 @@
/* Handle the args, seperate from argv0 */
cmdline = "";
for (i = 1; args && args[i]; ++i) {
- if (has_space(args[i])) {
+ if (has_space(args[i]) || !args[i][0]) {
cmdline = apr_pstrcat(pool, cmdline, " \"", args[i], "\"", NULL);
}
else {
--
Philip Martin
|