This commit is contained in:
Nicholas Marriott
2008-06-18 22:21:51 +00:00
parent 28aefe4162
commit 99df48d70f
28 changed files with 97 additions and 97 deletions

View File

@ -1,4 +1,4 @@
/* $Id: forkpty-sunos.c,v 1.4 2008-06-18 22:00:49 nicm Exp $ */
/* $Id: forkpty-sunos.c,v 1.5 2008-06-18 22:21:51 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -39,12 +39,12 @@ forkpty(int *master,
goto out;
if (unlockpt(*master) != 0)
goto out;
if ((path = ptsname(*master)) == NULL)
goto out;
if ((slave = open(path, O_RDWR|O_NOCTTY)) == -1)
goto out;
switch (pid = fork()) {
case -1:
goto out;
@ -59,10 +59,10 @@ forkpty(int *master,
fatal("ioctl failed");
if (ioctl(slave, I_PUSH, "ldterm") == -1)
fatal("ioctl failed");
if (ioctl(slave, TIOCSWINSZ, ws) == -1)
fatal("ioctl failed");
dup2(slave, 0);
dup2(slave, 1);
dup2(slave, 2);