aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-02-27 10:19:10 +0000
committerUlrich Drepper <drepper@redhat.com>1998-02-27 10:19:10 +0000
commitb0df72f4fbd600427553425da5be32bbd52c15e3 (patch)
tree0b3aa81e54db6b485dae50d0bcbe80bbdf40f4e3
parent9eb2730eab81c7732ecd9727c64165cab01b0d2b (diff)
downloadglibc-b0df72f4fbd600427553425da5be32bbd52c15e3.zip
glibc-b0df72f4fbd600427553425da5be32bbd52c15e3.tar.gz
glibc-b0df72f4fbd600427553425da5be32bbd52c15e3.tar.bz2
Update.
1998-02-27 Ulrich Drepper <drepper@cygnus.com> * posix/execlp.c: POSIX.1 says that argv[0] *should* be provided, but does not require it. Handle missing argv[] values gracefully. * posix/execl.c: Likewise. * posix/execle.c: Likewise.
-rw-r--r--ChangeLog7
-rw-r--r--elf/ldd.sh.in2
-rw-r--r--posix/execl.c7
-rw-r--r--posix/execle.c7
-rw-r--r--posix/execlp.c7
5 files changed, 17 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 4404bce..ebdc2fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+1998-02-27 Ulrich Drepper <drepper@cygnus.com>
+
+ * posix/execlp.c: POSIX.1 says that argv[0] *should* be provided,
+ but does not require it. Handle missing argv[] values gracefully.
+ * posix/execl.c: Likewise.
+ * posix/execle.c: Likewise.
+
1998-02-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/libm-ieee754/s_isnanl.c: Ignore the explicit integer
diff --git a/elf/ldd.sh.in b/elf/ldd.sh.in
index 90ec9ff..884472f 100644
--- a/elf/ldd.sh.in
+++ b/elf/ldd.sh.in
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998 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
diff --git a/posix/execl.c b/posix/execl.c
index ad6190c..13f8b39 100644
--- a/posix/execl.c
+++ b/posix/execl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1994, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1994, 1997, 1998 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
@@ -39,8 +39,8 @@ execl (const char *path, const char *arg, ...)
argv[0] = arg;
va_start (args, arg);
- i = 1;
- do
+ i = 0;
+ while (argv[i++] != NULL)
{
if (i == argv_max)
{
@@ -62,7 +62,6 @@ execl (const char *path, const char *arg, ...)
argv[i] = va_arg (args, const char *);
}
- while (argv[i++] != NULL);
va_end (args);
return __execve (path, (char *const *) argv, __environ);
diff --git a/posix/execle.c b/posix/execle.c
index 7619a36..dc150a4 100644
--- a/posix/execle.c
+++ b/posix/execle.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1997, 1998 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
@@ -35,8 +35,8 @@ execle (const char *path, const char *arg, ...)
argv[0] = arg;
va_start(args, arg);
- i = 1;
- do
+ i = 0;
+ while (argv[i++] != NULL)
{
if (i == argv_max)
{
@@ -58,7 +58,6 @@ execle (const char *path, const char *arg, ...)
argv[i] = va_arg (args, const char *);
}
- while (argv[i++] != NULL);
envp = va_arg(args, const char *const *);
va_end(args);
diff --git a/posix/execlp.c b/posix/execlp.c
index 88a5417..6cad640 100644
--- a/posix/execlp.c
+++ b/posix/execlp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1996, 1997, 1998 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
@@ -36,8 +36,8 @@ execlp (const char *file, const char *arg, ...)
argv[0] = arg;
va_start (args, arg);
- i = 1;
- do
+ i = 0;
+ while (argv[i++] != NULL)
{
if (i == argv_max)
{
@@ -59,7 +59,6 @@ execlp (const char *file, const char *arg, ...)
argv[i] = va_arg (args, const char *);
}
- while (argv[i++] != NULL);
va_end (args);
return execvp (file, (char *const *) argv);