diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-11-13 08:14:27 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-11-13 08:14:27 +0000 |
commit | 948ff2456bc7839817ea043b42b6423538ab873c (patch) | |
tree | b457a7351639193c4cdbbb3960c97fc079dd725d /ext/pty | |
parent | 90ff4f01abc702b1f3376682bbaf8f4a8f6d2690 (diff) | |
download | ruby-948ff2456bc7839817ea043b42b6423538ab873c.tar.gz |
* signal.c (sighandle): should not re-register sighandler if
POSIX_SIGNAL is defined.
* eval.c (error_print): errat array may be empty.
* eval.c (rb_eval_cmd): should not upgrade safe level unless
explicitly specified by argument newly added.
* signal.c (sig_trap): should not allow tainted trap closure.
* variable.c (rb_f_trace_var): should not allow trace_var on safe
level higher than 3.
* variable.c (rb_f_trace_var): should not allow tainted trace
closure.
* gc.c: do not use static stack until system stack overflows.
* eval.c (eval): should call Exception#exception instead of
calling rb_exc_new3() directly.
* error.c (exc_exception): set "mesg" directly to the clone. it
might be better to set mesg via some method for flexibility.
* variable.c (cvar_override_check): should print original module
name, if 'a' is T_ICLASS.
* parse.y (yylex): float '1_.0' should not be allowed.
* variable.c (var_getter): should care about var as Qfalse
(ruby-bugs#PR199).
* array.c (cmpint): <=> or block for {min,max} may return bignum.
* array.c (sort_1): use rb_compint.
* array.c (sort_2): ditto.
* enum.c (min_ii): ditto.
* enum.c (min_ii): ditto.
* enum.c (max_i): ditto.
* enum.c (max_ii): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/pty')
-rw-r--r-- | ext/pty/pty.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/ext/pty/pty.c b/ext/pty/pty.c index 3bf100ef20..748869865e 100644 --- a/ext/pty/pty.c +++ b/ext/pty/pty.c @@ -361,8 +361,8 @@ freeDevice() /* ruby function: getpty */ static VALUE -pty_getpty(self, shell) - VALUE self, shell; +pty_getpty(self, command) + VALUE self, command; { VALUE res, th; struct pty_info info; @@ -373,15 +373,19 @@ pty_getpty(self, shell) MakeOpenFile(rport, rfptr); MakeOpenFile(wport, wfptr); - establishShell(RSTRING(shell)->ptr,&info); + if (TYPE(command) == T_ARRAY) + command = rb_ary_join(command,rb_str_new2(" ")); + Check_SafeStr(command); + + establishShell(RSTRING(command)->ptr,&info); rfptr->mode = rb_io_mode_flags("r"); rfptr->f = fdopen(info.fd, "r"); - rfptr->path = strdup(RSTRING(shell)->ptr); + rfptr->path = strdup(RSTRING(command)->ptr); wfptr->mode = rb_io_mode_flags("w"); wfptr->f = fdopen(dup(info.fd), "w"); - wfptr->path = strdup(RSTRING(shell)->ptr); + wfptr->path = strdup(RSTRING(command)->ptr); res = rb_ary_new2(3); rb_ary_store(res,0,(VALUE)rport); |