Hi,

At Fri, 15 Sep 2006 07:58:21 +0900,
Joe Van Dyk wrote in [ruby-talk:214515]:
> Any ideas?

Sorry, my mistake.


Index: ext/pty/pty.c =================================================================== RCS file: /home/K8052/cvs/ruby/ext/pty/pty.c,v retrieving revision 1.19.2.4 diff -U 2 -p -u -r1.19.2.4 pty.c --- ext/pty/pty.c 26 Jul 2006 09:15:31 -0000 1.19.2.4 +++ ext/pty/pty.c 15 Sep 2006 07:46:41 -0000 @@ -63,5 +63,5 @@ char *MasterDevice = "/dev/ptym/pty%s", }; #elif defined(_IBMESA) /* AIX/ESA */ -static +static char *MasterDevice = "/dev/ptyp%s", *SlaveDevice = "/dev/ttyp%s", @@ -85,5 +85,5 @@ char *MasterDevice = "/dev/ptyp%s", }; #elif !defined(HAVE_PTSNAME) -static +static char *MasterDevice = "/dev/pty%s", *SlaveDevice = "/dev/tty%s", @@ -184,8 +184,11 @@ struct exec_info { }; +static VALUE pty_exec _((VALUE v)); + static VALUE -pty_exec(arg) - struct exec_info *arg; +pty_exec(v) + VALUE v; { + struct exec_info *arg = (struct exec_info *)v; return rb_f_exec(arg->argc, arg->argv); } @@ -196,6 +199,6 @@ establishShell(argc, argv, info) VALUE *argv; struct pty_info *info; -{ - static int i,master,slave,currentPid; +{ + int i,master,slave; char *p,*getenv(); struct passwd *pwent; @@ -232,6 +235,4 @@ establishShell(argc, argv, info) if(i == 0) { /* child */ - currentPid = getpid(); - /* * Set free from process group and controlling terminal @@ -245,5 +246,5 @@ establishShell(argc, argv, info) perror("setpgrp()"); # else /* SETGRP_VOID */ - if (setpgrp(0, currentPid) == -1) + if (setpgrp(0, getpid()) == -1) rb_sys_fail("setpgrp()"); if ((i = open("/dev/tty", O_RDONLY)) < 0) @@ -333,5 +334,4 @@ get_device_once(master, slave, fail) return 0; -} #else /* HAVE__GETPTY */ int i,j; @@ -426,5 +426,5 @@ pty_getpty(argc, argv, self) VALUE rport = rb_obj_alloc(rb_cFile); VALUE wport = rb_obj_alloc(rb_cFile); - + MakeOpenFile(rport, rfptr); MakeOpenFile(wport, wfptr);
-- Nobu Nakada