summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'process.c')
-rw-r--r--process.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/process.c b/process.c
index 4271c2ff1b..76720977c8 100644
--- a/process.c
+++ b/process.c
@@ -1494,7 +1494,6 @@ rb_f_system(argc, argv)
int i;
RETSIGTYPE (*chfunc)(int);
- chfunc = signal(SIGCHLD, SIG_DFL);
fflush(stdout);
fflush(stderr);
if (argc == 0) {
@@ -1516,6 +1515,8 @@ rb_f_system(argc, argv)
for (i = 0; i < argc; i++) {
SafeStringValue(argv[i]);
}
+ security(RSTRING(prog ? prog : argv[0])->ptr);
+ chfunc = signal(SIGCHLD, SIG_DFL);
retry:
pid = fork();
if (pid == 0) {