diff options
| author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-05-18 08:01:07 +0000 |
|---|---|---|
| committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-05-18 08:01:07 +0000 |
| commit | 74724107e96228c34f92a1f210342891bb29400e (patch) | |
| tree | 1ed0c7b2e41d900eca421148ee888c6c87ad73c3 /tool | |
| parent | c6da9cadb346cc1d250c7ed6d8fd33c62a11030e (diff) | |
thread.c (rb_wait_for_single_fd): do not leak EINTR on timeout
We must not leak EINTR to users in case a signal hits a
ppoll/select caller right when (or just before) the timeout
expires. In other words, the timeout should take precedence
over the -1 result from ppoll or select.
We also try one more time in case of EINTR with a zero timeout,
since technically the syscall finished before timing out if
it returns EINTR.
Regression appeared in r62457
("thread.c (update_timespec): use timespec_update_expire",
commit e6bf0128add103730d8c96727f3ed4dab95088e4)
and is not in any stable release of Ruby.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
0 files changed, 0 insertions, 0 deletions
