зеркало из https://github.com/github/ruby.git
* process.c (rb_waitpid): no needs to poll. [ruby-dev:31871]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
55f7f3dd3c
Коммит
4d1450fc96
|
@ -1,3 +1,7 @@
|
||||||
|
Thu Sep 27 03:17:41 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* process.c (rb_waitpid): no needs to poll. [ruby-dev:31871]
|
||||||
|
|
||||||
Wed Sep 26 20:11:46 2007 Koichi Sasada <ko1@atdot.net>
|
Wed Sep 26 20:11:46 2007 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
* bootstraptest/test_knownbug.rb: remove a fixed test.
|
* bootstraptest/test_knownbug.rb: remove a fixed test.
|
||||||
|
|
|
@ -605,7 +605,6 @@ rb_waitpid(rb_pid_t pid, int *st, int flags)
|
||||||
arg.pid = pid;
|
arg.pid = pid;
|
||||||
arg.st = st;
|
arg.st = st;
|
||||||
arg.flags = flags;
|
arg.flags = flags;
|
||||||
retry:
|
|
||||||
result = (rb_pid_t)rb_thread_blocking_region(rb_waitpid_blocking, &arg,
|
result = (rb_pid_t)rb_thread_blocking_region(rb_waitpid_blocking, &arg,
|
||||||
RB_UBF_DFL, 0);
|
RB_UBF_DFL, 0);
|
||||||
if (result < 0) {
|
if (result < 0) {
|
||||||
|
@ -617,10 +616,6 @@ rb_waitpid(rb_pid_t pid, int *st, int flags)
|
||||||
#endif
|
#endif
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (result == 0) {
|
|
||||||
rb_thread_polling();
|
|
||||||
goto retry;
|
|
||||||
}
|
|
||||||
#else /* NO_WAITPID */
|
#else /* NO_WAITPID */
|
||||||
if (pid_tbl && st_lookup(pid_tbl, pid, (st_data_t *)st)) {
|
if (pid_tbl && st_lookup(pid_tbl, pid, (st_data_t *)st)) {
|
||||||
rb_last_status_set(*st, pid);
|
rb_last_status_set(*st, pid);
|
||||||
|
@ -861,7 +856,7 @@ proc_waitall(void)
|
||||||
static VALUE
|
static VALUE
|
||||||
detach_process_watcher(void *arg)
|
detach_process_watcher(void *arg)
|
||||||
{
|
{
|
||||||
rb_pid_t cpid, pid = (rb_pid_t)arg;
|
rb_pid_t cpid, pid = (rb_pid_t)(VALUE)arg;
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
while ((cpid = rb_waitpid(pid, &status, 0)) == 0) {
|
while ((cpid = rb_waitpid(pid, &status, 0)) == 0) {
|
||||||
|
@ -873,7 +868,7 @@ detach_process_watcher(void *arg)
|
||||||
VALUE
|
VALUE
|
||||||
rb_detach_process(rb_pid_t pid)
|
rb_detach_process(rb_pid_t pid)
|
||||||
{
|
{
|
||||||
return rb_thread_create(detach_process_watcher, (void*)pid);
|
return rb_thread_create(detach_process_watcher, (void*)(VALUE)pid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#define RUBY_VERSION "1.9.0"
|
#define RUBY_VERSION "1.9.0"
|
||||||
#define RUBY_RELEASE_DATE "2007-09-26"
|
#define RUBY_RELEASE_DATE "2007-09-27"
|
||||||
#define RUBY_VERSION_CODE 190
|
#define RUBY_VERSION_CODE 190
|
||||||
#define RUBY_RELEASE_CODE 20070926
|
#define RUBY_RELEASE_CODE 20070927
|
||||||
#define RUBY_PATCHLEVEL 0
|
#define RUBY_PATCHLEVEL 0
|
||||||
|
|
||||||
#define RUBY_VERSION_MAJOR 1
|
#define RUBY_VERSION_MAJOR 1
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
#define RUBY_VERSION_TEENY 0
|
#define RUBY_VERSION_TEENY 0
|
||||||
#define RUBY_RELEASE_YEAR 2007
|
#define RUBY_RELEASE_YEAR 2007
|
||||||
#define RUBY_RELEASE_MONTH 9
|
#define RUBY_RELEASE_MONTH 9
|
||||||
#define RUBY_RELEASE_DAY 26
|
#define RUBY_RELEASE_DAY 27
|
||||||
|
|
||||||
#ifdef RUBY_EXTERN
|
#ifdef RUBY_EXTERN
|
||||||
RUBY_EXTERN const char ruby_version[];
|
RUBY_EXTERN const char ruby_version[];
|
||||||
|
|
Загрузка…
Ссылка в новой задаче