Skip to content

Commit

Permalink
Problems resetting the pty on linux+jna, #27
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed Oct 17, 2016
1 parent 7d1a3a8 commit ecea215
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,12 @@ public Attributes getAttr() throws IOException {
@Override
public void setAttr(Attributes attr) throws IOException {
termios termios = new termios(attr);
C_LIBRARY.tcsetattr(getSlave(), TCSADRAIN, termios);
termios org = new termios();
C_LIBRARY.tcgetattr(getSlave(), org);
org.c_iflag = termios.c_iflag;
org.c_oflag = termios.c_oflag;
org.c_lflag = termios.c_lflag;
C_LIBRARY.tcsetattr(getSlave(), TCSADRAIN, org);
}

@Override
Expand Down

0 comments on commit ecea215

Please sign in to comment.