mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* thread_pthread.c (native_sleep): timespec tv_sec may overflow on
some platform. a patch from zunda <zunda616e AT yahoo.co.jp> in [ruby-dev:32904]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
58d8e1450f
commit
d4c2cca3cb
2 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Mon Dec 31 22:53:29 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* thread_pthread.c (native_sleep): timespec tv_sec may overflow on
|
||||||
|
some platform. a patch from zunda <zunda616e AT yahoo.co.jp> in
|
||||||
|
[ruby-dev:32904].
|
||||||
|
|
||||||
Mon Dec 31 19:35:20 2007 Tanaka Akira <akr@fsij.org>
|
Mon Dec 31 19:35:20 2007 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* string.c (IS_7BIT): removed.
|
* string.c (IS_7BIT): removed.
|
||||||
|
|
|
@ -432,7 +432,7 @@ native_sleep(rb_thread_t *th, struct timeval *tv)
|
||||||
thread_debug("native_sleep: interrupted before sleep\n");
|
thread_debug("native_sleep: interrupted before sleep\n");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (tv == 0) {
|
if (tv == 0 || ts.tv_sec < tvn.tv_sec /* overflow */ ) {
|
||||||
thread_debug("native_sleep: pthread_cond_wait start\n");
|
thread_debug("native_sleep: pthread_cond_wait start\n");
|
||||||
pthread_cond_wait(&th->native_thread_data.sleep_cond,
|
pthread_cond_wait(&th->native_thread_data.sleep_cond,
|
||||||
&th->interrupt_lock);
|
&th->interrupt_lock);
|
||||||
|
|
Loading…
Add table
Reference in a new issue