mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/pty/pty.c (child_info): add slavename.
(chfunc): use slavename. (establishShell): set slavename. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ebed0a6e9a
commit
9bfd822bd1
2 changed files with 9 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Mon Dec 15 20:59:10 2008 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
* ext/pty/pty.c (child_info): add slavename.
|
||||||
|
(chfunc): use slavename.
|
||||||
|
(establishShell): set slavename.
|
||||||
|
|
||||||
Mon Dec 15 20:16:46 2008 NAKAMURA Usaku <usa@ruby-lang.org>
|
Mon Dec 15 20:16:46 2008 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
* common.mk (EXTMK_ARGS): shouldn't use ``\"'' because cmd.exe eat
|
* common.mk (EXTMK_ARGS): shouldn't use ``\"'' because cmd.exe eat
|
||||||
|
|
|
@ -145,6 +145,7 @@ pty_exec(VALUE v)
|
||||||
|
|
||||||
struct child_info {
|
struct child_info {
|
||||||
int master, slave;
|
int master, slave;
|
||||||
|
char *slavename;
|
||||||
int argc;
|
int argc;
|
||||||
VALUE *argv;
|
VALUE *argv;
|
||||||
};
|
};
|
||||||
|
@ -193,7 +194,7 @@ int chfunc(void *data)
|
||||||
/* errors ignored for sun */
|
/* errors ignored for sun */
|
||||||
#else
|
#else
|
||||||
close(slave);
|
close(slave);
|
||||||
slave = open(SlaveName, O_RDWR);
|
slave = open(carg->slavename, O_RDWR);
|
||||||
if (slave < 0) {
|
if (slave < 0) {
|
||||||
perror("open: pty slave");
|
perror("open: pty slave");
|
||||||
_exit(1);
|
_exit(1);
|
||||||
|
@ -249,6 +250,7 @@ establishShell(int argc, VALUE *argv, struct pty_info *info,
|
||||||
|
|
||||||
carg.master = master;
|
carg.master = master;
|
||||||
carg.slave = slave;
|
carg.slave = slave;
|
||||||
|
carg.slavename = SlaveName;
|
||||||
carg.argc = argc;
|
carg.argc = argc;
|
||||||
carg.argv = argv;
|
carg.argv = argv;
|
||||||
pid = rb_fork(0, chfunc, &carg, Qnil);
|
pid = rb_fork(0, chfunc, &carg, Qnil);
|
||||||
|
|
Loading…
Add table
Reference in a new issue