diff --git a/NT/tools/lib.pike b/NT/tools/lib.pike
index 93f12cd232ef57967ed5dde5d3d44be0565f1b0a..c5dae94b758409fb036ad3b9f6a148e7c424664d 100644
--- a/NT/tools/lib.pike
+++ b/NT/tools/lib.pike
@@ -232,7 +232,9 @@ int silent_do_cmd(string *cmd, mixed|void filter, int|void silent)
 	  }
       };
 
-      if(!silent && !!Stdio.stdin->tcgetattr())
+      if(!silent &&
+	 !!Stdio.stdin->tcgetattr() &&
+	!!Stdio.stdout->tcgetattr())
       {
 	inout=RLInOut();
       }else