diff options
Diffstat (limited to 'src/lib/libc/stdlib/system.c')
-rw-r--r-- | src/lib/libc/stdlib/system.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/libc/stdlib/system.c b/src/lib/libc/stdlib/system.c index c2f39325f6..3e1b047393 100644 --- a/src/lib/libc/stdlib/system.c +++ b/src/lib/libc/stdlib/system.c | |||
@@ -32,8 +32,7 @@ | |||
32 | */ | 32 | */ |
33 | 33 | ||
34 | #if defined(LIBC_SCCS) && !defined(lint) | 34 | #if defined(LIBC_SCCS) && !defined(lint) |
35 | /*static char *sccsid = "from: @(#)system.c 5.10 (Berkeley) 2/23/91";*/ | 35 | static char *rcsid = "$OpenBSD: system.c,v 1.3 1996/09/15 09:31:52 tholo Exp $"; |
36 | static char *rcsid = "$Id: system.c,v 1.1.1.1 1995/10/18 08:42:20 deraadt Exp $"; | ||
37 | #endif /* LIBC_SCCS and not lint */ | 36 | #endif /* LIBC_SCCS and not lint */ |
38 | 37 | ||
39 | #include <sys/types.h> | 38 | #include <sys/types.h> |
@@ -53,11 +52,13 @@ system(command) | |||
53 | sig_t intsave, quitsave; | 52 | sig_t intsave, quitsave; |
54 | int omask; | 53 | int omask; |
55 | int pstat; | 54 | int pstat; |
56 | char *argp[] = {"sh", "-c", (char *) command, NULL}; | 55 | char *argp[] = {"sh", "-c", NULL, NULL}; |
57 | 56 | ||
58 | if (!command) /* just checking... */ | 57 | if (!command) /* just checking... */ |
59 | return(1); | 58 | return(1); |
60 | 59 | ||
60 | argp[2] = (char *)command; | ||
61 | |||
61 | omask = sigblock(sigmask(SIGCHLD)); | 62 | omask = sigblock(sigmask(SIGCHLD)); |
62 | switch(pid = vfork()) { | 63 | switch(pid = vfork()) { |
63 | case -1: /* error */ | 64 | case -1: /* error */ |