diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-03-10 15:05:18 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-03-10 15:05:18 +0000 |
commit | 5df41824baf1b5c1a24846ea667b12addf21151c (patch) | |
tree | 11cb95cc04fbef35876af401f82af0733f7b7fb1 /ext/pty | |
parent | 297016a680236bb7c98d763ca2f64d810ea841a3 (diff) | |
download | ruby-5df41824baf1b5c1a24846ea667b12addf21151c.tar.gz ruby-5df41824baf1b5c1a24846ea667b12addf21151c.tar.xz ruby-5df41824baf1b5c1a24846ea667b12addf21151c.zip |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@3571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/pty')
-rw-r--r-- | ext/pty/pty.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ext/pty/pty.c b/ext/pty/pty.c index f1d4f73a1..3189b9ae6 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; } |