зеркало из https://github.com/github/ruby.git
* process.c (before_fork_ruby): Renamed from before_fork.
(after_fork_ruby): Renamed from after_fork. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
ed0f2528e8
Коммит
777d61faf4
|
@ -1,3 +1,8 @@
|
|||
Wed Sep 3 19:10:28 2014 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* process.c (before_fork_ruby): Renamed from before_fork.
|
||||
(after_fork_ruby): Renamed from after_fork.
|
||||
|
||||
Wed Sep 3 18:56:05 2014 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* process.c (forked_child): Removed.
|
||||
|
|
14
process.c
14
process.c
|
@ -1163,8 +1163,8 @@ after_exec(void)
|
|||
after_exec_non_async_signal_safe();
|
||||
}
|
||||
|
||||
#define before_fork() before_exec()
|
||||
#define after_fork() (rb_threadptr_pending_interrupt_clear(GET_THREAD()), after_exec())
|
||||
#define before_fork_ruby() before_exec()
|
||||
#define after_fork_ruby() (rb_threadptr_pending_interrupt_clear(GET_THREAD()), after_exec())
|
||||
|
||||
#include "dln.h"
|
||||
|
||||
|
@ -3355,11 +3355,11 @@ retry_fork_ruby(int *status)
|
|||
|
||||
while (1) {
|
||||
prefork();
|
||||
before_fork();
|
||||
before_fork_ruby();
|
||||
pid = fork();
|
||||
if (pid == 0) /* fork succeed, child process */
|
||||
return pid;
|
||||
preserving_errno(after_fork());
|
||||
preserving_errno(after_fork_ruby());
|
||||
if (0 < pid) /* fork succeed, parent process */
|
||||
return pid;
|
||||
/* fork failed */
|
||||
|
@ -3379,7 +3379,7 @@ rb_fork_ruby(int *status)
|
|||
if (pid < 0)
|
||||
return pid;
|
||||
if (!pid) {
|
||||
after_fork();
|
||||
after_fork_ruby();
|
||||
}
|
||||
return pid;
|
||||
}
|
||||
|
@ -5717,9 +5717,9 @@ rb_daemon(int nochdir, int noclose)
|
|||
{
|
||||
int err = 0;
|
||||
#ifdef HAVE_DAEMON
|
||||
before_fork();
|
||||
before_fork_ruby();
|
||||
err = daemon(nochdir, noclose);
|
||||
after_fork();
|
||||
after_fork_ruby();
|
||||
rb_thread_atfork();
|
||||
#else
|
||||
int n;
|
||||
|
|
Загрузка…
Ссылка в новой задаче