stdlib/strtod.c \
unistd/alarm.c \
unistd/syslog.c \
- unistd/system.c \
unistd/time.c \
# Fortify implementations of libc functions.
upstream-openbsd/lib/libc/stdlib/strtoumax.c \
upstream-openbsd/lib/libc/stdlib/strtoll.c \
upstream-openbsd/lib/libc/stdlib/strtol.c \
+ upstream-openbsd/lib/libc/stdlib/system.c \
upstream-openbsd/lib/libc/locale/wcsxfrm.c \
libc_arch_static_src_files := \
*/
#include <sys/types.h>
+#include <sys/wait.h>
#include <signal.h>
#include <stdlib.h>
#include <unistd.h>
#include <paths.h>
-#include <sys/wait.h>
extern char **environ;
int
system(const char *command)
{
- pid_t pid;
+ pid_t pid;
sig_t intsave, quitsave;
sigset_t mask, omask;
int pstat;
case 0: /* child */
sigprocmask(SIG_SETMASK, &omask, NULL);
execve(_PATH_BSHELL, argp, environ);
- _exit(127);
- }
+ _exit(127);
+ }
- intsave = (sig_t) bsd_signal(SIGINT, SIG_IGN);
- quitsave = (sig_t) bsd_signal(SIGQUIT, SIG_IGN);
+ intsave = signal(SIGINT, SIG_IGN);
+ quitsave = signal(SIGQUIT, SIG_IGN);
pid = waitpid(pid, (int *)&pstat, 0);
sigprocmask(SIG_SETMASK, &omask, NULL);
- (void)bsd_signal(SIGINT, intsave);
- (void)bsd_signal(SIGQUIT, quitsave);
+ (void)signal(SIGINT, intsave);
+ (void)signal(SIGQUIT, quitsave);
return (pid == -1 ? -1 : pstat);
}