summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEivind Eklund <eivind@FreeBSD.org>1999-02-12 14:42:31 +0000
committerEivind Eklund <eivind@FreeBSD.org>1999-02-12 14:42:31 +0000
commitec10002d16340eee007c7973ebaa6dcdb4a3aea8 (patch)
tree10ab42466015e8bf7ebe3735eddc09faf1b07076
parentbac210578dc9057da96f3b88c84430b6e56aca4a (diff)
Notes
-rw-r--r--usr.bin/apply/apply.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/apply/apply.c b/usr.bin/apply/apply.c
index 3f0727d372c0..5499becd3055 100644
--- a/usr.bin/apply/apply.c
+++ b/usr.bin/apply/apply.c
@@ -190,9 +190,8 @@ system(command)
const char *command;
{
static char *name, *shell;
- union wait pstat;
pid_t pid;
- int omask;
+ int omask, pstat;
sig_t intsave, quitsave;
if (shell == NULL) {
@@ -217,11 +216,11 @@ system(command)
}
intsave = signal(SIGINT, SIG_IGN);
quitsave = signal(SIGQUIT, SIG_IGN);
- pid = waitpid(pid, (int *)&pstat, 0);
+ pid = waitpid(pid, &pstat, 0);
(void)sigsetmask(omask);
(void)signal(SIGINT, intsave);
(void)signal(SIGQUIT, quitsave);
- return(pid == -1 ? -1 : pstat.w_status);
+ return(pid == -1 ? -1 : pstat);
}
void