summaryrefslogtreecommitdiff
path: root/lib/System/Unix/Process.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/System/Unix/Process.cpp')
-rw-r--r--lib/System/Unix/Process.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/System/Unix/Process.cpp b/lib/System/Unix/Process.cpp
index c1448de8d4..cccd3ffcb6 100644
--- a/lib/System/Unix/Process.cpp
+++ b/lib/System/Unix/Process.cpp
@@ -122,5 +122,29 @@ void Process::PreventCoreFiles() {
#endif
}
+bool Process::StandardInIsUserInput() {
+#if HAVE_ISATTY
+ return isatty(0);
+#endif
+ // If we don't have isatty, just return false.
+ return false;
+}
+
+bool Process::StandardOutIsDisplayed() {
+#if HAVE_ISATTY
+ return isatty(1);
+#endif
+ // If we don't have isatty, just return false.
+ return false;
+}
+
+bool Process::StandardErrIsDisplayed() {
+#if HAVE_ISATTY
+ return isatty(2);
+#endif
+ // If we don't have isatty, just return false.
+ return false;
+}
+
}
// vim: sw=2 smartindent smarttab tw=80 autoindent expandtab