]> sourceware.org Git - glibc.git/commitdiff
1999-03-08 Roland McGrath <roland@baalperazim.frob.com>
authorRoland McGrath <roland@gnu.org>
Mon, 8 Mar 1999 12:41:21 +0000 (12:41 +0000)
committerRoland McGrath <roland@gnu.org>
Mon, 8 Mar 1999 12:41:21 +0000 (12:41 +0000)
* hurd/hurdexec.c (_hurd_exec): Handle ARGV or ENVP parameters being
null, in which case send an empty string.

hurd/hurdexec.c

index 83e44081f54b89f411387fa6ce66cdbdf6332cf8..fa35ce7d1bbfb25ed1bfc098e60ac0331162c144 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,93,94,95,96,97,99 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -49,8 +49,12 @@ _hurd_exec (task_t task, file_t file,
   mach_port_t *please_dealloc, *pdp;
 
   /* XXX needs to be hurdmalloc XXX */
-  if (err = __argz_create (argv, &args, &argslen))
+  if (argv == NULL)
+    args = NULL, argslen = 0;
+  else if (err = __argz_create (argv, &args, &argslen))
     return err;
+  if (envp == NULL)
+    env = NULL, envlen = 0;
   if (err = __argz_create (envp, &env, &envlen))
     goto outargs;
 
This page took 0.042278 seconds and 5 git commands to generate.