mirror of
https://github.com/opnsense/src.git
synced 2026-04-29 01:59:38 -04:00
Merge from OpenBSD up to rev 1.5 (matches NetBSD up to rev 1.3):
* Clean up waitpid parameter handling.
This commit is contained in:
parent
bac210578d
commit
ec10002d16
1 changed files with 3 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue