summaryrefslogtreecommitdiff
path: root/ext/pty/pty.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-03-10 15:05:18 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-03-10 15:05:18 +0000
commitbb544954b2679d4bd86fa6da6da29171e65e017a (patch)
tree11cb95cc04fbef35876af401f82af0733f7b7fb1 /ext/pty/pty.c
parent70b55f2018ba19a0a1b516bd7bf8b112cd7ae5fb (diff)
* 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
Diffstat (limited to 'ext/pty/pty.c')
-rw-r--r--ext/pty/pty.c9
1 files changed, 5 insertions, 4 deletions
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;
}