summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--eval.c3
-rw-r--r--io.c8
-rw-r--r--process.c9
-rw-r--r--version.h2
5 files changed, 7 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index 037e98ad13..1936238e0c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Jun 8 17:49:18 2010 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * io.c, eval.c, process.c: remove all condition of r26371.
+ now, all platform use the same way. [Bug #3278][ruby-core:30167]
+
Tue Jun 8 17:45:36 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/iconv/iconv.c (rb_iconv_sys_fail): fix number of arguments.
diff --git a/eval.c b/eval.c
index 8abfbb8af6..e92b821dd3 100644
--- a/eval.c
+++ b/eval.c
@@ -12352,9 +12352,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 4a435b27c5..6f420b16ac 100644
--- a/io.c
+++ b/io.c
@@ -3251,9 +3251,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) {
@@ -3281,17 +3279,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;
@@ -3312,9 +3306,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 c7be7286e1..8f6285df97 100644
--- a/process.c
+++ b/process.c
@@ -1330,13 +1330,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
@@ -1577,9 +1574,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 */
@@ -1587,9 +1582,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);
diff --git a/version.h b/version.h
index dfebee7857..86410cbf6d 100644
--- a/version.h
+++ b/version.h
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2010-06-08"
#define RUBY_VERSION_CODE 187
#define RUBY_RELEASE_CODE 20100608
-#define RUBY_PATCHLEVEL 286
+#define RUBY_PATCHLEVEL 287
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8