diff options
| author | tholo <> | 1996-09-15 09:31:53 +0000 | 
|---|---|---|
| committer | tholo <> | 1996-09-15 09:31:53 +0000 | 
| commit | 27b62657a94b21845fcea14320c285cb5b1a2800 (patch) | |
| tree | 947900ef381c1a838cf05f934ed5349615aac605 /src/lib/libc/stdlib/system.c | |
| parent | 5db356f3a7b6b461177c41660da527087e8d4399 (diff) | |
| download | openbsd-27b62657a94b21845fcea14320c285cb5b1a2800.tar.gz openbsd-27b62657a94b21845fcea14320c285cb5b1a2800.tar.bz2 openbsd-27b62657a94b21845fcea14320c285cb5b1a2800.zip  | |
Remove dead code
Remove unused variables
Silence some warnings
lint(1) is your friend
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libc/stdlib/system.c | 6 | 
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/libc/stdlib/system.c b/src/lib/libc/stdlib/system.c index 91f98888af..3e1b047393 100644 --- a/src/lib/libc/stdlib/system.c +++ b/src/lib/libc/stdlib/system.c  | |||
| @@ -32,7 +32,7 @@ | |||
| 32 | */ | 32 | */ | 
| 33 | 33 | ||
| 34 | #if defined(LIBC_SCCS) && !defined(lint) | 34 | #if defined(LIBC_SCCS) && !defined(lint) | 
| 35 | static char *rcsid = "$OpenBSD: system.c,v 1.2 1996/08/19 08:33:54 tholo Exp $"; | 35 | static char *rcsid = "$OpenBSD: system.c,v 1.3 1996/09/15 09:31:52 tholo Exp $"; | 
| 36 | #endif /* LIBC_SCCS and not lint */ | 36 | #endif /* LIBC_SCCS and not lint */ | 
| 37 | 37 | ||
| 38 | #include <sys/types.h> | 38 | #include <sys/types.h> | 
| @@ -52,11 +52,13 @@ system(command) | |||
| 52 | sig_t intsave, quitsave; | 52 | sig_t intsave, quitsave; | 
| 53 | int omask; | 53 | int omask; | 
| 54 | int pstat; | 54 | int pstat; | 
| 55 | char *argp[] = {"sh", "-c", (char *) command, NULL}; | 55 | char *argp[] = {"sh", "-c", NULL, NULL}; | 
| 56 | 56 | ||
| 57 | if (!command) /* just checking... */ | 57 | if (!command) /* just checking... */ | 
| 58 | return(1); | 58 | return(1); | 
| 59 | 59 | ||
| 60 | argp[2] = (char *)command; | ||
| 61 | |||
| 60 | omask = sigblock(sigmask(SIGCHLD)); | 62 | omask = sigblock(sigmask(SIGCHLD)); | 
| 61 | switch(pid = vfork()) { | 63 | switch(pid = vfork()) { | 
| 62 | case -1: /* error */ | 64 | case -1: /* error */ | 
