Switch to current OpenBSD system.c.
Change-Id: Ie2df60f0d55dca69149ffe064f10183411407987
This commit is contained in:
parent
c380385f0b
commit
1e4378ea06
@ -106,7 +106,6 @@ libc_common_src_files := \
|
|||||||
stdlib/strtod.c \
|
stdlib/strtod.c \
|
||||||
unistd/alarm.c \
|
unistd/alarm.c \
|
||||||
unistd/syslog.c \
|
unistd/syslog.c \
|
||||||
unistd/system.c \
|
|
||||||
unistd/time.c \
|
unistd/time.c \
|
||||||
|
|
||||||
# Fortify implementations of libc functions.
|
# Fortify implementations of libc functions.
|
||||||
@ -388,6 +387,7 @@ libc_upstream_openbsd_src_files := \
|
|||||||
upstream-openbsd/lib/libc/stdlib/strtoumax.c \
|
upstream-openbsd/lib/libc/stdlib/strtoumax.c \
|
||||||
upstream-openbsd/lib/libc/stdlib/strtoll.c \
|
upstream-openbsd/lib/libc/stdlib/strtoll.c \
|
||||||
upstream-openbsd/lib/libc/stdlib/strtol.c \
|
upstream-openbsd/lib/libc/stdlib/strtol.c \
|
||||||
|
upstream-openbsd/lib/libc/stdlib/system.c \
|
||||||
upstream-openbsd/lib/libc/locale/wcsxfrm.c \
|
upstream-openbsd/lib/libc/locale/wcsxfrm.c \
|
||||||
|
|
||||||
libc_arch_static_src_files := \
|
libc_arch_static_src_files := \
|
||||||
|
@ -29,11 +29,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#include <sys/wait.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <paths.h>
|
#include <paths.h>
|
||||||
#include <sys/wait.h>
|
|
||||||
|
|
||||||
extern char **environ;
|
extern char **environ;
|
||||||
|
|
||||||
@ -64,11 +64,11 @@ system(const char *command)
|
|||||||
_exit(127);
|
_exit(127);
|
||||||
}
|
}
|
||||||
|
|
||||||
intsave = (sig_t) bsd_signal(SIGINT, SIG_IGN);
|
intsave = signal(SIGINT, SIG_IGN);
|
||||||
quitsave = (sig_t) bsd_signal(SIGQUIT, SIG_IGN);
|
quitsave = signal(SIGQUIT, SIG_IGN);
|
||||||
pid = waitpid(pid, (int *)&pstat, 0);
|
pid = waitpid(pid, (int *)&pstat, 0);
|
||||||
sigprocmask(SIG_SETMASK, &omask, NULL);
|
sigprocmask(SIG_SETMASK, &omask, NULL);
|
||||||
(void)bsd_signal(SIGINT, intsave);
|
(void)signal(SIGINT, intsave);
|
||||||
(void)bsd_signal(SIGQUIT, quitsave);
|
(void)signal(SIGQUIT, quitsave);
|
||||||
return (pid == -1 ? -1 : pstat);
|
return (pid == -1 ? -1 : pstat);
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user