mirror of
https://github.com/tmate-io/tmate-ssh-server.git
synced 2020-11-18 19:53:51 -08:00
Call tcsetattr(). Not tested.
This commit is contained in:
parent
7c9f827bfe
commit
966818c23d
@ -1,4 +1,4 @@
|
|||||||
/* $Id: forkpty-aix.c,v 1.2 2009-03-31 22:08:45 nicm Exp $ */
|
/* $Id: forkpty-aix.c,v 1.3 2009-08-19 16:06:45 nicm Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
|
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||||
@ -27,8 +27,7 @@
|
|||||||
#include "tmux.h"
|
#include "tmux.h"
|
||||||
|
|
||||||
pid_t
|
pid_t
|
||||||
forkpty(int *master,
|
forkpty(int *master, unused char *name, struct termios *tio, struct winsize *ws)
|
||||||
unused char *name, unused struct termios *tio, struct winsize *ws)
|
|
||||||
{
|
{
|
||||||
int slave, fd;
|
int slave, fd;
|
||||||
char *path;
|
char *path;
|
||||||
@ -71,6 +70,8 @@ forkpty(int *master,
|
|||||||
fatal("open failed");
|
fatal("open failed");
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
||||||
|
if (tcsetattr(slave, TCSAFLUSH, tio) == -1)
|
||||||
|
fatal("tcsetattr failed");
|
||||||
if (ioctl(slave, TIOCSWINSZ, ws) == -1)
|
if (ioctl(slave, TIOCSWINSZ, ws) == -1)
|
||||||
fatal("ioctl failed");
|
fatal("ioctl failed");
|
||||||
|
|
||||||
|
@ -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>
|
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||||
@ -27,8 +27,7 @@
|
|||||||
#include "tmux.h"
|
#include "tmux.h"
|
||||||
|
|
||||||
pid_t
|
pid_t
|
||||||
forkpty(int *master,
|
forkpty(int *master, unused char *name, struct termios *tio, struct winsize *ws)
|
||||||
unused char *name, unused struct termios *tio, struct winsize *ws)
|
|
||||||
{
|
{
|
||||||
int slave;
|
int slave;
|
||||||
char *path;
|
char *path;
|
||||||
@ -63,6 +62,8 @@ forkpty(int *master,
|
|||||||
if (ioctl(slave, I_PUSH, "ldterm") == -1)
|
if (ioctl(slave, I_PUSH, "ldterm") == -1)
|
||||||
fatal("ioctl failed");
|
fatal("ioctl failed");
|
||||||
|
|
||||||
|
if (tcsetattr(slave, TCSAFLUSH, tio) == -1)
|
||||||
|
fatal("tcsetattr failed");
|
||||||
if (ioctl(slave, TIOCSWINSZ, ws) == -1)
|
if (ioctl(slave, TIOCSWINSZ, ws) == -1)
|
||||||
fatal("ioctl failed");
|
fatal("ioctl failed");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user