From 968bac58e6e700e77e9b96813e66c57d551308b4 Mon Sep 17 00:00:00 2001 From: kosaki Date: Sun, 23 May 2010 20:00:48 +0000 Subject: [PATCH] * io.c, eval.c, process.c: remove all condition of r26371. now, all platform use the same way. [Bug #3278][ruby-core:30167] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@27983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ eval.c | 3 --- io.c | 8 -------- process.c | 9 +-------- 4 files changed, 6 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 84eec26ca7..7a363ed16c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon May 24 04:58:39 2010 KOSAKI Motohiro + + * io.c, eval.c, process.c: remove all condition of r26371. + now, all platform use the same way. [Bug #3278][ruby-core:30167] + Fri May 21 08:33:52 2010 Yutaka Kanemoto * common.mk (EXPORTOBJS): merged r24482 from trunk. [Bug #3326] diff --git a/eval.c b/eval.c index 6bd710c24b..50c7e13fbc 100644 --- a/eval.c +++ b/eval.c @@ -12524,9 +12524,6 @@ rb_thread_start_timer() 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); diff --git a/io.c b/io.c index fb44ab85a3..3adca313a5 100644 --- a/io.c +++ b/io.c @@ -3271,9 +3271,7 @@ retry: } 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 @@ retry: 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 @@ retry: 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); diff --git a/process.c b/process.c index 1ff737d54a..49b5b779eb 100644 --- a/process.c +++ b/process.c @@ -1331,13 +1331,10 @@ rb_f_fork(obj) 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 @@ rb_f_system(argc, argv) 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_f_system(argc, argv) 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);