From 2311087b685e8dc0f21f4a89875f25c22f5c39a9 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 5 Mar 2018 06:56:09 +0000 Subject: 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 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- thread_pthread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'thread_pthread.c') diff --git a/thread_pthread.c b/thread_pthread.c index a05f8a5263..951885ffa0 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -1212,7 +1212,7 @@ async_bug_fd(const char *mesg, int errno_arg, int fd) 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); } -- cgit v1.2.3