aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>1999-06-21 20:38:08 +0000
committerBill Nottingham <notting@redhat.com>1999-06-21 20:38:08 +0000
commitef8617e6c8f2cb1f74fdc730db6a9943b4f3e91a (patch)
treea876c7909fb7c29bcb0144a2a6e61b99ff2dcbd7
parentcdb0bb121e7328ccf444c7e6cc6ede6845a18567 (diff)
downloadinitscripts-ef8617e6c8f2cb1f74fdc730db6a9943b4f3e91a.tar
initscripts-ef8617e6c8f2cb1f74fdc730db6a9943b4f3e91a.tar.gz
initscripts-ef8617e6c8f2cb1f74fdc730db6a9943b4f3e91a.tar.bz2
initscripts-ef8617e6c8f2cb1f74fdc730db6a9943b4f3e91a.tar.xz
initscripts-ef8617e6c8f2cb1f74fdc730db6a9943b4f3e91a.zip
make doexec not segfault if called with no args....
-rw-r--r--src/doexec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/doexec.c b/src/doexec.c
index a488be13..319f6c29 100644
--- a/src/doexec.c
+++ b/src/doexec.c
@@ -1,6 +1,7 @@
#include <unistd.h>
int main(int argc, char ** argv) {
+ if (argc<2) return 1;
execvp(argv[1], argv + 2);
return 1;
}