public static extern int SetAttributes(int fd, OptionalActions actions, ref TerminalState state);
public static extern int GetAttributes(int fd, out TerminalState state);