Skip to content

Commit

Permalink
push modules before winp ioctl in openpty. closes #14.
Browse files Browse the repository at this point in the history
  • Loading branch information
chjj committed May 1, 2012
1 parent 53e79c5 commit 579b91f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pty.cc
Original file line number Diff line number Diff line change
Expand Up @@ -462,13 +462,13 @@ pty_openpty(int *amaster, int *aslave, char *name,
if (slave == -1) goto err;
if (aslave) *aslave = slave;

if (termp) tcsetattr(slave, TCSAFLUSH, termp);
if (winp) ioctl(slave, TIOCSWINSZ, winp);

ioctl(slave, I_PUSH, "ptem");
ioctl(slave, I_PUSH, "ldterm");
ioctl(slave, I_PUSH, "ttcompat");

if (termp) tcsetattr(slave, TCSAFLUSH, termp);
if (winp) ioctl(slave, TIOCSWINSZ, winp);

return 0;

err:
Expand Down

0 comments on commit 579b91f

Please sign in to comment.