summaryrefslogtreecommitdiffstats
path: root/compat/forkpty-sunos.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2008-06-18 22:21:51 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2008-06-18 22:21:51 +0000
commit99df48d70f10dcf8f95d4684262a3392d72ee9c6 (patch)
treee3e7768fa327c937e15a35579c8ce3362ff96f51 /compat/forkpty-sunos.c
parent28aefe41623daba7685fe54ceb0b6952d5f6d98a (diff)
Trimify.
Diffstat (limited to 'compat/forkpty-sunos.c')
-rw-r--r--compat/forkpty-sunos.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/compat/forkpty-sunos.c b/compat/forkpty-sunos.c
index 51070f75..bc4fe8a3 100644
--- a/compat/forkpty-sunos.c
+++ b/compat/forkpty-sunos.c
@@ -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);