ruby-changes:23907
From: nobu <ko1@a...>
Date: Fri, 8 Jun 2012 11:30:17 +0900 (JST)
Subject: [ruby-changes:23907] nobu:r35958 (trunk): ext/pty/pty.c: status to protect
nobu 2012-06-08 11:25:55 +0900 (Fri, 08 Jun 2012) New Revision: 35958 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=35958 Log: ext/pty/pty.c: status to protect * ext/pty/pty.c (establishShell): now needs status to protect from exceptions in rb_fork_err(). Modified files: trunk/ChangeLog trunk/ext/pty/pty.c Index: ChangeLog =================================================================== --- ChangeLog (revision 35957) +++ ChangeLog (revision 35958) @@ -1,3 +1,8 @@ +Fri Jun 8 11:25:51 2012 Nobuyoshi Nakada <nobu@r...> + + * ext/pty/pty.c (establishShell): now needs status to protect from + exceptions in rb_fork_err(). + Thu Jun 7 22:13:05 2012 Tanaka Akira <akr@f...> * process.c (rb_fork_err): Fix the conditoin to use rb_protect. Index: ext/pty/pty.c =================================================================== --- ext/pty/pty.c (revision 35957) +++ ext/pty/pty.c (revision 35958) @@ -155,7 +155,7 @@ establishShell(int argc, VALUE *argv, struct pty_info *info, char SlaveName[DEVICELEN]) { - int master,slave; + int master, slave, status = 0; rb_pid_t pid; char *p, *getenv(); struct passwd *pwent; @@ -189,7 +189,7 @@ carg.argc = argc; carg.argv = argv; errbuf[0] = '\0'; - pid = rb_fork_err(0, chfunc, &carg, Qnil, errbuf, sizeof(errbuf)); + pid = rb_fork_err(&status, chfunc, &carg, Qnil, errbuf, sizeof(errbuf)); if (pid < 0) { int e = errno; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/