diff --git a/ChangeLog b/ChangeLog index 716baeea31..330a557a12 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Mon Dec 15 20:59:10 2008 Tanaka Akira + + * ext/pty/pty.c (child_info): add slavename. + (chfunc): use slavename. + (establishShell): set slavename. + Mon Dec 15 20:16:46 2008 NAKAMURA Usaku * common.mk (EXTMK_ARGS): shouldn't use ``\"'' because cmd.exe eat diff --git a/ext/pty/pty.c b/ext/pty/pty.c index b7da3d17ab..cb147386a7 100644 --- a/ext/pty/pty.c +++ b/ext/pty/pty.c @@ -145,6 +145,7 @@ pty_exec(VALUE v) struct child_info { int master, slave; + char *slavename; int argc; VALUE *argv; }; @@ -193,7 +194,7 @@ int chfunc(void *data) /* errors ignored for sun */ #else close(slave); - slave = open(SlaveName, O_RDWR); + slave = open(carg->slavename, O_RDWR); if (slave < 0) { perror("open: pty slave"); _exit(1); @@ -249,6 +250,7 @@ establishShell(int argc, VALUE *argv, struct pty_info *info, carg.master = master; carg.slave = slave; + carg.slavename = SlaveName; carg.argc = argc; carg.argv = argv; pid = rb_fork(0, chfunc, &carg, Qnil);