mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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@bowild.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
bd9bc1dbe5
commit
2311087b68
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue