From 46a6e6093d6e085c465833421a7dffadef9ba47c Mon Sep 17 00:00:00 2001 From: Clinton Ebadi Date: Sat, 4 Oct 2014 20:48:39 -0400 Subject: [PATCH] Client.getPass: catch syserror inval when detecting non-tty use libc in Debian before Jessie returns einval instead of enotty --- src/client.sml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client.sml b/src/client.sml index 00000e7..0c4112f 100644 --- a/src/client.sml +++ b/src/client.sml @@ -30,7 +30,7 @@ fun getpass () = val tty = Posix.FileSys.stdin val termios = SOME (Posix.TTY.TC.getattr tty) handle OS.SysErr (reason, SOME syserr) => - if syserr = Posix.Error.notty then + if syserr = Posix.Error.notty orelse syserr = Posix.Error.inval then (print "Warning: no terminal found, not hiding password\n"; TextIO.flushOut TextIO.stdOut; NONE) -- 2.20.1