Bug #2648 » patch-bug2648.diff
process.c (working copy) | ||
---|---|---|
fflush(stderr);
|
||
#endif
|
||
#ifdef __NetBSD__
|
||
#if defined(__NetBSD__) || defined(__APPLE__)
|
||
before_exec();
|
||
#endif
|
||
pid = fork();
|
||
#ifdef __NetBSD__
|
||
#if defined(__NetBSD__) || defined(__APPLE__)
|
||
after_exec();
|
||
#endif
|
||
switch (pid) {
|
||
... | ... | |
chfunc = signal(SIGCHLD, SIG_DFL);
|
||
retry:
|
||
#ifdef __NetBSD__
|
||
#if defined(__NetBSD__) || defined(__APPLE__)
|
||
before_exec();
|
||
#endif
|
||
pid = fork();
|
||
... | ... | |
rb_protect(proc_exec_args, (VALUE)&earg, NULL);
|
||
_exit(127);
|
||
}
|
||
#ifdef __NetBSD__
|
||
#if defined(__NetBSD__) || defined(__APPLE__)
|
||
after_exec();
|
||
#endif
|
||
if (pid < 0) {
|
eval.c (working copy) | ||
---|---|---|
safe_mutex_lock(&time_thread.lock);
|
||
if (pthread_create(&time_thread.thread, 0, thread_timer, args) == 0) {
|
||
thread_init = 1;
|
||
#ifndef __NetBSD__
|
||
#if !defined(__NetBSD__) && !defined(__APPLE__)
|
||
pthread_atfork(0, 0, rb_thread_stop_timer);
|
||
#endif
|
||
pthread_cond_wait(&start, &time_thread.lock);
|
io.c (working copy) | ||
---|---|---|
}
|
||
retry:
|
||
#ifdef __NetBSD__
|
||
#if defined(__NetBSD__) || defined(__APPLE__)
|
||
rb_thread_stop_timer();
|
||
#endif
|
||
switch ((pid = fork())) {
|
||
... | ... | |
ruby_sourcefile, ruby_sourceline, pname);
|
||
_exit(127);
|
||
}
|
||
#ifdef __NetBSD__
|
||
#if defined(__NetBSD__) || defined(__APPLE__)
|
||
rb_thread_start_timer();
|
||
#endif
|
||
rb_io_synchronized(RFILE(orig_stdout)->fptr);
|
||
... | ... | |
return Qnil;
|
||
case -1: /* fork failed */
|
||
#ifdef __NetBSD__
|
||
#if defined(__NetBSD__) || defined(__APPLE__)
|
||
rb_thread_start_timer();
|
||
#endif
|
||
if (errno == EAGAIN) {
|
||
... | ... | |
break;
|
||
default: /* parent */
|
||
#ifdef __NetBSD__
|
||
#if defined(__NetBSD__) || defined(__APPLE__)
|
||
rb_thread_start_timer();
|
||
#endif
|
||
if (pid < 0) rb_sys_fail(pname);
|
- « Previous
- 1
- 2
- Next »