From bb544954b2679d4bd86fa6da6da29171e65e017a Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 10 Mar 2003 15:05:18 +0000 Subject: * file.c (rb_find_file): need world writable directory check for relative paths too. * file.c (rb_find_file): world writable directory check if $SAFE >= 1 (was $SAFE >= 2). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/pty/pty.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'ext/pty') diff --git a/ext/pty/pty.c b/ext/pty/pty.c index f1d4f73a18..3189b9ae65 100644 --- a/ext/pty/pty.c +++ b/ext/pty/pty.c @@ -411,8 +411,9 @@ pty_getpty(argc, argv, self) VALUE *argv; VALUE self; { - VALUE res, th; - struct pty_info info, thinfo; + VALUE res; + struct pty_info info; + struct pty_info thinfo; OpenFile *wfptr,*rfptr; VALUE rport = rb_obj_alloc(rb_cFile); VALUE wport = rb_obj_alloc(rb_cFile); @@ -435,11 +436,11 @@ pty_getpty(argc, argv, self) rb_ary_store(res,1,(VALUE)wport); rb_ary_store(res,2,INT2FIX(info.child_pid)); - th = rb_thread_create(pty_syswait, (void*)&info); - thinfo.thread = th; + thinfo.thread = rb_thread_create(pty_syswait, (void*)&info); thinfo.child_pid = info.child_pid; if (rb_block_given_p()) { + rb_ensure(rb_yield, res, pty_finalize_syswait, (VALUE)&thinfo); return Qnil; } -- cgit v1.2.3