diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-08-19 16:06:45 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-08-19 16:06:45 +0000 |
commit | 966818c23d0cf15d93ad3c50ebadfd6d346ef428 (patch) | |
tree | 86a067cdf84d792e1567dfe7f4a33bdb67cb0d00 /compat/forkpty-sunos.c | |
parent | 7c9f827bfe01f440e09597319fcf280685500b7f (diff) |
Call tcsetattr(). Not tested.
Diffstat (limited to 'compat/forkpty-sunos.c')
-rw-r--r-- | compat/forkpty-sunos.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/compat/forkpty-sunos.c b/compat/forkpty-sunos.c index a4b1dbdf..09d1e572 100644 --- a/compat/forkpty-sunos.c +++ b/compat/forkpty-sunos.c @@ -1,4 +1,4 @@ -/* $Id: forkpty-sunos.c,v 1.6 2008-06-23 21:54:48 nicm Exp $ */ +/* $Id: forkpty-sunos.c,v 1.7 2009-08-19 16:06:45 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net> @@ -27,8 +27,7 @@ #include "tmux.h" pid_t -forkpty(int *master, - unused char *name, unused struct termios *tio, struct winsize *ws) +forkpty(int *master, unused char *name, struct termios *tio, struct winsize *ws) { int slave; char *path; @@ -63,6 +62,8 @@ forkpty(int *master, if (ioctl(slave, I_PUSH, "ldterm") == -1) fatal("ioctl failed"); + if (tcsetattr(slave, TCSAFLUSH, tio) == -1) + fatal("tcsetattr failed"); if (ioctl(slave, TIOCSWINSZ, ws) == -1) fatal("ioctl failed"); @@ -70,7 +71,7 @@ forkpty(int *master, dup2(slave, 1); dup2(slave, 2); if (slave > 2) - close(slave); + close(slave); return (0); } |