From b29d4affd855d0955865820dabf34182a2458da9 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sun, 20 Sep 2009 18:31:16 +0000 Subject: Don't try to use tio if it is NULL. --- compat/forkpty-aix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compat/forkpty-aix.c') diff --git a/compat/forkpty-aix.c b/compat/forkpty-aix.c index abc4c690..f7bc1b8b 100644 --- a/compat/forkpty-aix.c +++ b/compat/forkpty-aix.c @@ -1,4 +1,4 @@ -/* $Id: forkpty-aix.c,v 1.3 2009-08-19 16:06:45 nicm Exp $ */ +/* $Id: forkpty-aix.c,v 1.4 2009-09-20 18:31:16 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -70,7 +70,7 @@ forkpty(int *master, unused char *name, struct termios *tio, struct winsize *ws) fatal("open failed"); close(fd); - if (tcsetattr(slave, TCSAFLUSH, tio) == -1) + if (tio != NULL && tcsetattr(slave, TCSAFLUSH, tio) == -1) fatal("tcsetattr failed"); if (ioctl(slave, TIOCSWINSZ, ws) == -1) fatal("ioctl failed"); -- cgit