* parse.y (dsym): :"symbol string" style should not contain `\0'.

* process.c (proc_detach): new method Proc#detach(pid) which
  create background watcher thread to issue waitpid. [new]

* process.c (rb_detach_process): utility function to detach
  process from C code.

* ext/pty/pty.c (pty_finalize_syswait): terminate watcher thread,
  and detach child process (by creating new idle waitpid watcher
  thread).

* ext/pty/pty.c (pty_syswait): may lost signal stopped child.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2003-03-07 05:59:42 +00:00
parent 5208fec1cf
commit 9d77639f30
9 changed files with 119 additions and 100 deletions

12
eval.c
View file

@ -4024,17 +4024,19 @@ massign(self, node, val, pcall)
int pcall;
{
NODE *list;
VALUE tmp;
long i = 0, len;
len = RARRAY(val)->len;
list = node->nd_head;
if (len == 1 && list) {
if (len == 1 && list && (list->nd_next || node->nd_args)) {
VALUE v = RARRAY(val)->ptr[0];
VALUE tmp = rb_check_array_type(v);
tmp = rb_check_array_type(v);
if (NIL_P(tmp)) {
assign(self, list->nd_head, v, pcall);
list = list->nd_next;
i = 1;
}
else {
len = RARRAY(tmp)->len;
@ -4043,13 +4045,13 @@ massign(self, node, val, pcall)
list = list->nd_next;
}
}
i = 1;
}
else {
for (; list && i<len; i++) {
assign(self, list->nd_head, RARRAY(val)->ptr[i], pcall);
list = list->nd_next;
}
tmp = val;
}
if (pcall && list) goto arg_error;
if (node->nd_args) {
@ -4057,7 +4059,7 @@ massign(self, node, val, pcall)
/* no check for mere `*' */
}
else if (!list && i<len) {
assign(self, node->nd_args, rb_ary_new4(len-i, RARRAY(val)->ptr+i), pcall);
assign(self, node->nd_args, rb_ary_new4(len-i, RARRAY(tmp)->ptr+i), pcall);
}
else {
assign(self, node->nd_args, rb_ary_new2(0), pcall);
@ -8640,7 +8642,7 @@ rb_thread_run(thread)
return thread;
}
static VALUE
VALUE
rb_thread_kill(thread)
VALUE thread;
{