diff options
| author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-01-21 16:29:51 +0000 |
|---|---|---|
| committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-01-21 16:29:51 +0000 |
| commit | 031cab4d2f1c4f854d988fe152853052888186cd (patch) | |
| tree | d5f623425a095fdd7acdfb61e998ebd99c65e947 /process.c | |
| parent | e99cc37db444046e94d25b7aec324c707c9bfdd2 (diff) | |
* eval.c (thread_timer, rb_thread_stop_timer): check the timing of
stopping timer. patch from KOSAKI Motohiro <kosaki.motohiro _AT_
jp.fujitsu.com>
* eval.c (rb_thread_start_timer): NetBSD5 seems to be hung when calling
pthread_create() from pthread_atfork()'s parent handler.
* io.c (pipe_open): workaround for NetBSD5. stop timer thread before
fork(), and start it if needed.
* process.c (rb_f_fork, rb_f_system): ditto.
fixed [ruby-dev:40074]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@26371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
| -rw-r--r-- | process.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -1331,7 +1331,14 @@ rb_f_fork(obj) fflush(stderr); #endif +#ifdef __NetBSD__ + before_exec(); + pid = fork(); + after_exec(); + switch (pid) { +#else switch (pid = fork()) { +#endif case 0: #ifdef linux after_exec(); @@ -1571,6 +1578,9 @@ rb_f_system(argc, argv) chfunc = signal(SIGCHLD, SIG_DFL); retry: +#ifdef __NetBSD__ + before_exec(); +#endif pid = fork(); if (pid == 0) { /* child process */ @@ -1578,6 +1588,9 @@ rb_f_system(argc, argv) rb_protect(proc_exec_args, (VALUE)&earg, NULL); _exit(127); } +#ifdef __NetBSD__ + after_exec(); +#endif if (pid < 0) { if (errno == EAGAIN) { rb_thread_sleep(1); |
