We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d3824b0 commit b6e12ddCopy full SHA for b6e12dd
1 file changed
RailControl.cpp
@@ -24,7 +24,7 @@ along with RailControl; see the file LICENCE. If not see
24
#include <iostream>
25
#include <signal.h>
26
#include <sstream>
27
-#include <unistd.h> //close;
+#include <unistd.h> //close; isatty
28
#include <vector>
29
30
#include "ArgumentHandler.h"
@@ -183,7 +183,7 @@ int main (int argc, char* argv[])
183
// wait for q or r followed by \n or SIGINT or SIGTERM
184
do
185
{
186
- if (silent)
+ if (!isatty(STDIN_FILENO) || silent)
187
188
Utils::Utils::SleepForSeconds(1);
189
}
0 commit comments