client: function to check if stdin is a tty
[hcoop/domtool2.git] / src / client.sml
index 0c4112f..a92b13f 100644 (file)
@@ -25,6 +25,9 @@ datatype passwd_result =
        | Aborted
        | Error
 
+fun hastty () =
+    Posix.ProcEnv.isatty Posix.FileSys.stdin
+
 fun getpass () =
     let
        val tty = Posix.FileSys.stdin