summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-10 17:04:40 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-10 17:04:40 +0000
commit74b339e9385181844ee44d155ac59c8544e5016c (patch)
treeb7fe34a558012145e0106c159601ead197535ae4 /process.c
parent0b6c9402c77692b290537a66517e12bda8f6a6bb (diff)
* thread_pthread.c (rb_thread_create_timer_thread): removed
rb_disable_interrupt()/rb_enable_interrupt(). * vm_core.h: ditto. * process.c (static void before_exec): ditto. * process.c (static void after_exec): ditto. [Bug #4765] [ruby-dev:43571] * eval_intern.h: removed rb_trap_restore_mask(). * vm_eval.c (rb_throw_obj): ditto. * eval.c (setup_exception): ditto. * signal.c: removed trap_last_mask. * signal.c (trap_restore_mask): removed. * signal.c (init_sigchld): comment clarification why signal block is needed. and removed trap_last_mask operation. * signal.c (trap_ensure): removed trap_last_mask operation. * signal.c (rb_disable_interrupt, rb_enable_interrupt): made static and removed sigdelset(SIGVTALARM) and sigdelset(SIGSEGV). * process.c (rb_syswait): removed implicit signal handler change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
-rw-r--r--process.c43
1 files changed, 1 insertions, 42 deletions
diff --git a/process.c b/process.c
index 1289db53e4..d811867055 100644
--- a/process.c
+++ b/process.c
@@ -992,12 +992,6 @@ static RETSIGTYPE sig_do_nothing(int sig)
static void before_exec(void)
{
- /*
- * signalmask is inherited across exec() and almost system commands don't
- * work if signalmask is blocked.
- */
- rb_enable_interrupt();
-
#ifdef SIGPIPE
/*
* Some OS commands don't initialize signal handler properly. Thus we have
@@ -1028,7 +1022,6 @@ static void after_exec(void)
#endif
forked_child = 0;
- rb_disable_interrupt();
}
#define before_fork() before_exec()
@@ -2947,43 +2940,9 @@ rb_f_abort(int argc, VALUE *argv)
void
rb_syswait(rb_pid_t pid)
{
- static int overriding;
-#ifdef SIGHUP
- RETSIGTYPE (*hfunc)(int) = 0;
-#endif
-#ifdef SIGQUIT
- RETSIGTYPE (*qfunc)(int) = 0;
-#endif
- RETSIGTYPE (*ifunc)(int) = 0;
int status;
- int i, hooked = FALSE;
- if (!overriding) {
-#ifdef SIGHUP
- hfunc = signal(SIGHUP, SIG_IGN);
-#endif
-#ifdef SIGQUIT
- qfunc = signal(SIGQUIT, SIG_IGN);
-#endif
- ifunc = signal(SIGINT, SIG_IGN);
- overriding = TRUE;
- hooked = TRUE;
- }
-
- do {
- i = rb_waitpid(pid, &status, 0);
- } while (i == -1 && errno == EINTR);
-
- if (hooked) {
-#ifdef SIGHUP
- signal(SIGHUP, hfunc);
-#endif
-#ifdef SIGQUIT
- signal(SIGQUIT, qfunc);
-#endif
- signal(SIGINT, ifunc);
- overriding = FALSE;
- }
+ rb_waitpid(pid, &status, 0);
}
static VALUE