Index: process.c =================================================================== --- process.c (リビジョン 27673) +++ process.c (作業コピー) @@ -1331,13 +1331,10 @@ fflush(stderr); #endif -#if defined(__NetBSD__) || defined(__APPLE__) || defined(linux) before_exec(); -#endif pid = fork(); -#if defined(__NetBSD__) || defined(__APPLE__) || defined(linux) after_exec(); -#endif + switch (pid) { case 0: #ifdef linux @@ -1578,9 +1575,7 @@ chfunc = signal(SIGCHLD, SIG_DFL); retry: -#if defined(__NetBSD__) || defined(__APPLE__) || defined(linux) before_exec(); -#endif pid = fork(); if (pid == 0) { /* child process */ @@ -1588,9 +1583,7 @@ rb_protect(proc_exec_args, (VALUE)&earg, NULL); _exit(127); } -#if defined(__NetBSD__) || defined(__APPLE__) || defined(linux) after_exec(); -#endif if (pid < 0) { if (errno == EAGAIN) { rb_thread_sleep(1); Index: io.c =================================================================== --- io.c (リビジョン 27673) +++ io.c (作業コピー) @@ -3271,9 +3271,7 @@ } retry: -#if defined(__NetBSD__) || defined(__APPLE__) || defined(linux) rb_thread_stop_timer(); -#endif switch ((pid = fork())) { case 0: /* child */ if (modef & FMODE_READABLE) { @@ -3301,17 +3299,13 @@ ruby_sourcefile, ruby_sourceline, pname); _exit(127); } -#if defined(__NetBSD__) || defined(__APPLE__) || defined(linux) rb_thread_start_timer(); -#endif rb_io_synchronized(RFILE(orig_stdout)->fptr); rb_io_synchronized(RFILE(orig_stderr)->fptr); return Qnil; case -1: /* fork failed */ -#if defined(__NetBSD__) || defined(__APPLE__) || defined(linux) rb_thread_start_timer(); -#endif if (errno == EAGAIN) { rb_thread_sleep(1); goto retry; @@ -3332,9 +3326,7 @@ break; default: /* parent */ -#if defined(__NetBSD__) || defined(__APPLE__) || defined(linux) rb_thread_start_timer(); -#endif if (pid < 0) rb_sys_fail(pname); else { VALUE port = io_alloc(rb_cIO); Index: eval.c =================================================================== --- eval.c (リビジョン 27673) +++ eval.c (作業コピー) @@ -12524,9 +12524,6 @@ safe_mutex_lock(&time_thread.lock); if (pthread_create(&time_thread.thread, 0, thread_timer, args) == 0) { thread_init = 1; -#if !defined(__NetBSD__) && !defined(__APPLE__) && !defined(linux) - pthread_atfork(0, 0, rb_thread_stop_timer); -#endif pthread_cond_wait(&start, &time_thread.lock); } pthread_cleanup_pop(1);