ruby-changes:51585
From: normal <ko1@a...>
Date: Sat, 30 Jun 2018 12:50:57 +0900 (JST)
Subject: [ruby-changes:51585] normal:r63796 (trunk): mjit: provide more diagnostics for waitpid failures
normal 2018-06-30 12:50:52 +0900 (Sat, 30 Jun 2018) New Revision: 63796 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63796 Log: mjit: provide more diagnostics for waitpid failures Also, enable check for defined(_WIN32) macro for SIGCHLD_LOSSY, too. [Bug #14867] Modified files: trunk/mjit.c trunk/vm_core.h Index: mjit.c =================================================================== --- mjit.c (revision 63795) +++ mjit.c (revision 63796) @@ -422,8 +422,9 @@ exec_process(const char *path, char *con https://github.com/ruby/ruby/blob/trunk/mjit.c#L422 : waitpid(pid, &stat, 0); if (r == -1) { if (errno == EINTR) continue; - fprintf(stderr, "[%d] waitpid(%d): %s\n", - getpid(), pid, strerror(errno)); + fprintf(stderr, "[%d] waitpid(%d): %s (SIGCHLD=%d,%u)\n", + getpid(), pid, strerror(errno), + RUBY_SIGCHLD, SIGCHLD_LOSSY); break; } else if (r == pid) { Index: vm_core.h =================================================================== --- vm_core.h (revision 63795) +++ vm_core.h (revision 63796) @@ -101,7 +101,7 @@ https://github.com/ruby/ruby/blob/trunk/vm_core.h#L101 #endif /* platforms with broken or non-existent SIGCHLD work by polling */ -#if defined(__APPLE__) || defined(__WIN32__) +#if defined(__APPLE__) || defined(__WIN32__) || defined(_WIN32) # define SIGCHLD_LOSSY (1) #else # define SIGCHLD_LOSSY (0) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/