summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrooneg <rooneg@13f79535-47bb-0310-9956-ffa450edef68>2006-01-26 21:47:48 +0000
committerrooneg <rooneg@13f79535-47bb-0310-9956-ffa450edef68>2006-01-26 21:47:48 +0000
commit703c83ca97ce638c548bf3afe22d08f9a959017b (patch)
tree930a9a616c7bb3ae419b1d20dbe0ff6c7132c14b
parent00d0773d9d559f6759b41b65fdcb023d2282803f (diff)
downloadlibapr-703c83ca97ce638c548bf3afe22d08f9a959017b.tar.gz
Merge r355792 to 0.9.x.
Original log message: Fix passing "" as an argument to a new program on windows. * threadproc/win32/proc.c (apr_proc_create): Pass empty strings into CreateProcess instead of filtering them out. * CHANGES: Note change. Submitted by: Philip Martin <philip codematters.co.uk> Reviewed by: wrowe, rooneg git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/0.9.x@372619 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--CHANGES4
-rw-r--r--threadproc/win32/proc.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index 4c26a3668..7be98a0f0 100644
--- a/CHANGES
+++ b/CHANGES
@@ -13,6 +13,10 @@ Changes with APR 0.9.8-dev
used in such a case.
[Garrett Rooney]
+ *) Fix passing "" as an argument to the program started by apr_proc_create
+ on Win32.
+ [Philip Martin <philip codematters.co.uk>
+
*) Fix warning when compiling on FreeBSD by correcting the type of
the final argument passed to sysctlbyname. [Garrett Rooney]
diff --git a/threadproc/win32/proc.c b/threadproc/win32/proc.c
index 6b04deed7..7f85d91ac 100644
--- a/threadproc/win32/proc.c
+++ b/threadproc/win32/proc.c
@@ -347,7 +347,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
/* 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 {