summaryrefslogtreecommitdiffstats
path: root/usr.bin/apply
diff options
context:
space:
mode:
authoreivind <eivind@FreeBSD.org>1999-02-12 14:42:31 +0000
committereivind <eivind@FreeBSD.org>1999-02-12 14:42:31 +0000
commit789d08be6a36111ead307dfa99cf7fffea4794fa (patch)
treeb93a726d516298b8184cb654bdf47eadcc62fe6f /usr.bin/apply
parente4dfcc3fca28b62859e06f17f30c58940849d6d1 (diff)
downloadFreeBSD-src-789d08be6a36111ead307dfa99cf7fffea4794fa.zip
FreeBSD-src-789d08be6a36111ead307dfa99cf7fffea4794fa.tar.gz
Merge from OpenBSD up to rev 1.5 (matches NetBSD up to rev 1.3):
* Clean up waitpid parameter handling.
Diffstat (limited to 'usr.bin/apply')
-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 3f0727d..5499bec 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
OpenPOWER on IntegriCloud