fork() is deprecated on Solaris
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
97538e813f
commit
05316c40ac
7
mjit.c
7
mjit.c
@ -381,7 +381,14 @@ start_process(const char *path, char *const *argv)
|
|||||||
}
|
}
|
||||||
dev_null = rb_cloexec_open(ruby_null_device, O_WRONLY, 0);
|
dev_null = rb_cloexec_open(ruby_null_device, O_WRONLY, 0);
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
# pragma GCC diagnostic push
|
||||||
|
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
|
#endif
|
||||||
if ((pid = vfork()) == 0) {
|
if ((pid = vfork()) == 0) {
|
||||||
|
#ifdef __GNUC__
|
||||||
|
# pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
umask(0077);
|
umask(0077);
|
||||||
if (mjit_opts.verbose == 0) {
|
if (mjit_opts.verbose == 0) {
|
||||||
/* CC can be started in a thread using a file which has been
|
/* CC can be started in a thread using a file which has been
|
||||||
|
14
process.c
14
process.c
@ -3867,6 +3867,10 @@ retry_fork_async_signal_safe(int *status, int *ep,
|
|||||||
while (1) {
|
while (1) {
|
||||||
prefork();
|
prefork();
|
||||||
disable_child_handler_before_fork(&old);
|
disable_child_handler_before_fork(&old);
|
||||||
|
#ifdef __GNUC__
|
||||||
|
# pragma GCC diagnostic push
|
||||||
|
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
|
#endif
|
||||||
#ifdef HAVE_WORKING_VFORK
|
#ifdef HAVE_WORKING_VFORK
|
||||||
if (!has_privilege())
|
if (!has_privilege())
|
||||||
pid = vfork();
|
pid = vfork();
|
||||||
@ -3874,6 +3878,9 @@ retry_fork_async_signal_safe(int *status, int *ep,
|
|||||||
pid = fork();
|
pid = fork();
|
||||||
#else
|
#else
|
||||||
pid = fork();
|
pid = fork();
|
||||||
|
#endif
|
||||||
|
#ifdef __GNUC__
|
||||||
|
# pragma GCC diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
if (pid == 0) {/* fork succeed, child process */
|
if (pid == 0) {/* fork succeed, child process */
|
||||||
int ret;
|
int ret;
|
||||||
@ -3943,7 +3950,14 @@ rb_fork_ruby(int *status)
|
|||||||
prefork();
|
prefork();
|
||||||
disable_child_handler_before_fork(&old);
|
disable_child_handler_before_fork(&old);
|
||||||
before_fork_ruby();
|
before_fork_ruby();
|
||||||
|
#ifdef __GNUC__
|
||||||
|
# pragma GCC diagnostic push
|
||||||
|
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
|
#endif
|
||||||
pid = fork();
|
pid = fork();
|
||||||
|
#ifdef __GNUC__
|
||||||
|
# pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
err = errno;
|
err = errno;
|
||||||
after_fork_ruby();
|
after_fork_ruby();
|
||||||
disable_child_handler_fork_parent(&old); /* yes, bad name */
|
disable_child_handler_fork_parent(&old); /* yes, bad name */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user