From: Eric Wong Date: 2018-07-06T02:56:50+00:00 Subject: [ruby-core:87829] Re: [Ruby trunk Bug#14867] Process.wait can wait for MJIT compiler process Greg: oh, I think I finally spotted it. The waitpid() macro for _WIN32 doesn't set a return value. The old code assumed waitpid always succeeds, and the new code checks the return value. So I think we need to fake the return value, for now. Can you try this? (Won't need the other patches) ``` --- a/mjit.c +++ b/mjit.c @@ -132,7 +132,7 @@ rb_pid_t ruby_waitpid_locked(rb_vm_t *, rb_pid_t, int *status, int options, #define dlclose(handle) (FreeLibrary(handle)) #define RTLD_NOW -1 -#define waitpid(pid,stat_loc,options) (WaitForSingleObject((HANDLE)(pid), INFINITE), GetExitCodeProcess((HANDLE)(pid), (LPDWORD)(stat_loc))) +#define waitpid(pid,stat_loc,options) (WaitForSingleObject((HANDLE)(pid), INFINITE), GetExitCodeProcess((HANDLE)(pid), (LPDWORD)(stat_loc)), (pid)) #define WIFEXITED(S) ((S) != STILL_ACTIVE) #define WEXITSTATUS(S) (S) #define WIFSIGNALED(S) (0) ``` Unsubscribe: