ruby-changes:50523
From: nobu <ko1@a...>
Date: Mon, 5 Mar 2018 15:56:13 +0900 (JST)
Subject: [ruby-changes:50523] nobu:r62661 (trunk): Tiny Fix for ASYNC BUG error message copying
nobu 2018-03-05 15:56:09 +0900 (Mon, 05 Mar 2018) New Revision: 62661 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62661 Log: Tiny Fix for ASYNC BUG error message copying The previous logic would overwrite the error message, replacing the message with the `fd` number. This tiny update will print the message in full. (I'm trying to debug an issue with the timer thread on my machine and the lack of error messages makes it really hard). [Fix GH-1829] From: Bo <bo@b...> Modified files: trunk/thread_pthread.c Index: thread_pthread.c =================================================================== --- thread_pthread.c (revision 62660) +++ thread_pthread.c (revision 62661) @@ -1212,7 +1212,7 @@ async_bug_fd(const char *mesg, int errno https://github.com/ruby/ruby/blob/trunk/thread_pthread.c#L1212 char buff[64]; size_t n = strlcpy(buff, mesg, sizeof(buff)); if (n < sizeof(buff)-3) { - ruby_snprintf(buff, sizeof(buff)-n, "(%d)", fd); + ruby_snprintf(buff+n, sizeof(buff)-n, "(%d)", fd); } rb_async_bug_errno(buff, errno_arg); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/