+ val termios = SOME (Posix.TTY.TC.getattr tty)
+ handle OS.SysErr (reason, SOME syserr) =>
+ if syserr = Posix.Error.notty then
+ (print "Warning: no terminal found, not hiding password\n";
+ TextIO.flushOut TextIO.stdOut;
+ NONE)
+ else raise OS.SysErr (reason, SOME syserr)
+ val fields = case termios of SOME termios => SOME (Posix.TTY.fieldsOf termios)
+ | NONE => NONE