aboutsummaryrefslogtreecommitdiffstats
path: root/ext/pty
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pty')
-rw-r--r--ext/pty/pty.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/pty/pty.c b/ext/pty/pty.c
index 06d4075726..be87c3701b 100644
--- a/ext/pty/pty.c
+++ b/ext/pty/pty.c
@@ -155,7 +155,7 @@ static void
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 @@ establishShell(int argc, VALUE *argv, struct pty_info *info,
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;