From commits-return-7098-apmail-apr-commits-archive=apr.apache.org@apr.apache.org Mon Oct 10 10:44:51 2005 Return-Path: Delivered-To: apmail-apr-commits-archive@www.apache.org Received: (qmail 11852 invoked from network); 10 Oct 2005 10:44:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Oct 2005 10:44:50 -0000 Received: (qmail 31406 invoked by uid 500); 10 Oct 2005 10:44:50 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 31299 invoked by uid 500); 10 Oct 2005 10:44:49 -0000 Mailing-List: contact commits-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: dev@apr.apache.org List-Id: Delivered-To: mailing list commits@apr.apache.org Received: (qmail 31288 invoked by uid 99); 10 Oct 2005 10:44:49 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 10 Oct 2005 03:44:49 -0700 Received: (qmail 11752 invoked by uid 65534); 10 Oct 2005 10:44:29 -0000 Message-ID: <20051010104428.11745.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r312607 - /apr/apr/trunk/threadproc/unix/proc.c Date: Mon, 10 Oct 2005 10:44:28 -0000 To: commits@apr.apache.org From: trawick@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: trawick Date: Mon Oct 10 03:44:24 2005 New Revision: 312607 URL: http://svn.apache.org/viewcvs?rev=312607&view=rev Log: Don't pass NULL to execve() for the environment array, resolving a theoretical problem with standards compliance and an actual problem with Purify. Reviewed by: Joe Orton Modified: apr/apr/trunk/threadproc/unix/proc.c Modified: apr/apr/trunk/threadproc/unix/proc.c URL: http://svn.apache.org/viewcvs/apr/apr/trunk/threadproc/unix/proc.c?rev=312607&r1=312606&r2=312607&view=diff ============================================================================== --- apr/apr/trunk/threadproc/unix/proc.c (original) +++ apr/apr/trunk/threadproc/unix/proc.c Mon Oct 10 03:44:24 2005 @@ -326,6 +326,14 @@ apr_pool_t *pool) { int i; + const char * const empty_envp[] = {NULL}; + + if (!env) { /* Specs require an empty array instead of NULL; + * Purify will trigger a failure, even if many + * implementations don't. + */ + env = empty_envp; + } new->in = attr->parent_in; new->err = attr->parent_err;