apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r312608 - /apr/apr/branches/1.2.x/threadproc/unix/proc.c
Date Mon, 10 Oct 2005 10:45:12 GMT
Author: trawick
Date: Mon Oct 10 03:45:08 2005
New Revision: 312608

URL: http://svn.apache.org/viewcvs?rev=312608&view=rev
Log:
Backport from trunk:

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/branches/1.2.x/threadproc/unix/proc.c

Modified: apr/apr/branches/1.2.x/threadproc/unix/proc.c
URL: http://svn.apache.org/viewcvs/apr/apr/branches/1.2.x/threadproc/unix/proc.c?rev=312608&r1=312607&r2=312608&view=diff
==============================================================================
--- apr/apr/branches/1.2.x/threadproc/unix/proc.c (original)
+++ apr/apr/branches/1.2.x/threadproc/unix/proc.c Mon Oct 10 03:45:08 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;



Mime
View raw message