[前][次][番号順一覧][スレッド一覧]

ruby-changes:73001

From: Nobuyoshi <ko1@a...>
Date: Sun, 21 Aug 2022 14:05:23 +0900 (JST)
Subject: [ruby-changes:73001] f6d4d73abd (master): Use `rb_fork` to suppress deprecated-declarations warnings

https://git.ruby-lang.org/ruby.git/commit/?id=f6d4d73abd

From f6d4d73abd986fbd89918fa8bbbb82746ee08371 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Sun, 21 Aug 2022 14:04:52 +0900
Subject: Use `rb_fork` to suppress deprecated-declarations warnings

---
 common.mk | 1 +
 mjit.c    | 5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/common.mk b/common.mk
index e34139d485..56d283599b 100644
--- a/common.mk
+++ b/common.mk
@@ -9477,6 +9477,7 @@ mjit.$(OBJEXT): $(top_srcdir)/internal/file.h https://github.com/ruby/ruby/blob/trunk/common.mk#L9477
 mjit.$(OBJEXT): $(top_srcdir)/internal/gc.h
 mjit.$(OBJEXT): $(top_srcdir)/internal/hash.h
 mjit.$(OBJEXT): $(top_srcdir)/internal/imemo.h
+mjit.$(OBJEXT): $(top_srcdir)/internal/process.h
 mjit.$(OBJEXT): $(top_srcdir)/internal/serial.h
 mjit.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
 mjit.$(OBJEXT): $(top_srcdir)/internal/vm.h
diff --git a/mjit.c b/mjit.c
index e519a3091d..a873b3d9f8 100644
--- a/mjit.c
+++ b/mjit.c
@@ -76,6 +76,7 @@ https://github.com/ruby/ruby/blob/trunk/mjit.c#L76
 #include "internal/cont.h"
 #include "internal/file.h"
 #include "internal/hash.h"
+#include "internal/process.h"
 #include "internal/warnings.h"
 #include "vm_sync.h"
 #include "ractor_core.h"
@@ -747,7 +748,7 @@ start_mjit_compact(struct rb_mjit_unit *unit) https://github.com/ruby/ruby/blob/trunk/mjit.c#L748
     rb_vm_t *vm = GET_VM();
     rb_native_mutex_lock(&vm->waitpid_lock);
 
-    pid_t pid = fork();
+    pid_t pid = rb_fork();
     if (pid == 0) {
         rb_native_mutex_unlock(&vm->waitpid_lock);
 
@@ -910,7 +911,7 @@ start_mjit_compile(struct rb_mjit_unit *unit) https://github.com/ruby/ruby/blob/trunk/mjit.c#L911
     rb_vm_t *vm = GET_VM();
     rb_native_mutex_lock(&vm->waitpid_lock);
 
-    pid_t pid = fork();
+    pid_t pid = rb_fork();
     if (pid == 0) {
         rb_native_mutex_unlock(&vm->waitpid_lock);
 
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]