From dev-return-14903-apmail-apr-dev-archive=apr.apache.org@apr.apache.org Mon Oct 17 20:15:50 2005 Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 1853 invoked from network); 17 Oct 2005 20:15:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 17 Oct 2005 20:15:50 -0000 Received: (qmail 24705 invoked by uid 500); 17 Oct 2005 20:15:49 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 24494 invoked by uid 500); 17 Oct 2005 20:15:48 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 24483 invoked by uid 99); 17 Oct 2005 20:15:47 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Oct 2005 13:15:47 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [81.103.221.47] (HELO mta07-winn.ispmail.ntl.com) (81.103.221.47) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Oct 2005 13:15:47 -0700 Received: from aamta12-winn.ispmail.ntl.com ([81.103.221.35]) by mta07-winn.ispmail.ntl.com with ESMTP id <20051017201524.YHTP21883.mta07-winn.ispmail.ntl.com@aamta12-winn.ispmail.ntl.com> for ; Mon, 17 Oct 2005 21:15:24 +0100 Received: from debian2 ([86.3.241.171]) by aamta12-winn.ispmail.ntl.com with ESMTP id <20051017201524.ZPLC10626.aamta12-winn.ispmail.ntl.com@debian2> for ; Mon, 17 Oct 2005 21:15:24 +0100 Received: from pm by debian2 with local (Exim 4.50) id 1ERbOD-0001Vy-SX for dev@apr.apache.org; Mon, 17 Oct 2005 21:15:21 +0100 To: dev@apr.apache.org Subject: [PATCH] win32 apr_proc_create empty parameters From: Philip Martin Date: Mon, 17 Oct 2005 21:15:21 +0100 Message-ID: <87sluz6gti.fsf@debian2.lan> User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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