merge revision(s) 27983:

* 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_7@28222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
shyouhei 2010-06-08 09:02:21 +00:00
parent 1ab8a925be
commit c0144a2fbb
5 changed files with 7 additions and 20 deletions

View file

@ -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> 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. * ext/iconv/iconv.c (rb_iconv_sys_fail): fix number of arguments.

3
eval.c
View file

@ -12352,9 +12352,6 @@ rb_thread_start_timer()
safe_mutex_lock(&time_thread.lock); safe_mutex_lock(&time_thread.lock);
if (pthread_create(&time_thread.thread, 0, thread_timer, args) == 0) { if (pthread_create(&time_thread.thread, 0, thread_timer, args) == 0) {
thread_init = 1; 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_cond_wait(&start, &time_thread.lock);
} }
pthread_cleanup_pop(1); pthread_cleanup_pop(1);

8
io.c
View file

@ -3251,9 +3251,7 @@ retry:
} }
retry: retry:
#if defined(__NetBSD__) || defined(__APPLE__) || defined(linux)
rb_thread_stop_timer(); rb_thread_stop_timer();
#endif
switch ((pid = fork())) { switch ((pid = fork())) {
case 0: /* child */ case 0: /* child */
if (modef & FMODE_READABLE) { if (modef & FMODE_READABLE) {
@ -3281,17 +3279,13 @@ retry:
ruby_sourcefile, ruby_sourceline, pname); ruby_sourcefile, ruby_sourceline, pname);
_exit(127); _exit(127);
} }
#if defined(__NetBSD__) || defined(__APPLE__) || defined(linux)
rb_thread_start_timer(); rb_thread_start_timer();
#endif
rb_io_synchronized(RFILE(orig_stdout)->fptr); rb_io_synchronized(RFILE(orig_stdout)->fptr);
rb_io_synchronized(RFILE(orig_stderr)->fptr); rb_io_synchronized(RFILE(orig_stderr)->fptr);
return Qnil; return Qnil;
case -1: /* fork failed */ case -1: /* fork failed */
#if defined(__NetBSD__) || defined(__APPLE__) || defined(linux)
rb_thread_start_timer(); rb_thread_start_timer();
#endif
if (errno == EAGAIN) { if (errno == EAGAIN) {
rb_thread_sleep(1); rb_thread_sleep(1);
goto retry; goto retry;
@ -3312,9 +3306,7 @@ retry:
break; break;
default: /* parent */ default: /* parent */
#if defined(__NetBSD__) || defined(__APPLE__) || defined(linux)
rb_thread_start_timer(); rb_thread_start_timer();
#endif
if (pid < 0) rb_sys_fail(pname); if (pid < 0) rb_sys_fail(pname);
else { else {
VALUE port = io_alloc(rb_cIO); VALUE port = io_alloc(rb_cIO);

View file

@ -1330,13 +1330,10 @@ rb_f_fork(obj)
fflush(stderr); fflush(stderr);
#endif #endif
#if defined(__NetBSD__) || defined(__APPLE__) || defined(linux)
before_exec(); before_exec();
#endif
pid = fork(); pid = fork();
#if defined(__NetBSD__) || defined(__APPLE__) || defined(linux)
after_exec(); after_exec();
#endif
switch (pid) { switch (pid) {
case 0: case 0:
#ifdef linux #ifdef linux
@ -1577,9 +1574,7 @@ rb_f_system(argc, argv)
chfunc = signal(SIGCHLD, SIG_DFL); chfunc = signal(SIGCHLD, SIG_DFL);
retry: retry:
#if defined(__NetBSD__) || defined(__APPLE__) || defined(linux)
before_exec(); before_exec();
#endif
pid = fork(); pid = fork();
if (pid == 0) { if (pid == 0) {
/* child process */ /* child process */
@ -1587,9 +1582,7 @@ rb_f_system(argc, argv)
rb_protect(proc_exec_args, (VALUE)&earg, NULL); rb_protect(proc_exec_args, (VALUE)&earg, NULL);
_exit(127); _exit(127);
} }
#if defined(__NetBSD__) || defined(__APPLE__) || defined(linux)
after_exec(); after_exec();
#endif
if (pid < 0) { if (pid < 0) {
if (errno == EAGAIN) { if (errno == EAGAIN) {
rb_thread_sleep(1); rb_thread_sleep(1);

View file

@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2010-06-08" #define RUBY_RELEASE_DATE "2010-06-08"
#define RUBY_VERSION_CODE 187 #define RUBY_VERSION_CODE 187
#define RUBY_RELEASE_CODE 20100608 #define RUBY_RELEASE_CODE 20100608
#define RUBY_PATCHLEVEL 286 #define RUBY_PATCHLEVEL 287
#define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8 #define RUBY_VERSION_MINOR 8