summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2025-02-13 13:12:24 +0900
committerNobuyoshi Nakada <[email protected]>2025-02-13 13:12:24 +0900
commitcf00b31b5d9882325d2124cb257fb6a3476e0d78 (patch)
tree3176ec9bd01e56dc104b3c590a9d10fec34b01e3
parent908fe85dfcfaf3ab69e3f77b17edc7952246f4f9 (diff)
Remove a stale function for MJIT
-rw-r--r--win32/win32.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 44552a2016..a3dbee29f7 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -1309,46 +1309,6 @@ is_batch(const char *cmd)
#define utf8_to_wstr(str, plen) mbstr_to_wstr(CP_UTF8, str, -1, plen)
#define wstr_to_utf8(str, plen) wstr_to_mbstr(CP_UTF8, str, -1, plen)
-/* License: Ruby's */
-HANDLE
-rb_w32_start_process(const char *abspath, char *const *argv, int out_fd)
-{
- /* NOTE: This function is used by RJIT worker, so it can be used parallelly with
- Ruby's main thread. So functions touching things shared with main thread can't
- be used, like `ALLOCV` that may trigger GC or `FindFreeChildSlot` that finds
- a slot from shared memory without atomic locks. */
- struct ChildRecord child;
- char *cmd;
- size_t len;
- WCHAR *wcmd = NULL, *wprog = NULL;
- HANDLE outHandle = NULL;
-
- if (out_fd) {
- outHandle = (HANDLE)rb_w32_get_osfhandle(out_fd);
- }
-
- len = join_argv(NULL, argv, FALSE, filecp(), 1);
- cmd = alloca(sizeof(char) * len);
- join_argv(cmd, argv, FALSE, filecp(), 1);
-
- if (!(wcmd = mbstr_to_wstr(filecp(), cmd, -1, NULL))) {
- errno = E2BIG;
- return NULL;
- }
- if (!(wprog = mbstr_to_wstr(filecp(), abspath, -1, NULL))) {
- errno = E2BIG;
- return NULL;
- }
-
- if (!CreateChild(&child, wcmd, wprog, NULL, outHandle, outHandle, 0)) {
- return NULL;
- }
-
- free(wcmd);
- free(wprog);
- return child.hProcess;
-}
-
/* License: Artistic or GPL */
static rb_pid_t
w32_spawn(int mode, const char *cmd, const char *prog, UINT cp)