diff options
Diffstat (limited to 'lib/System/Unix/Process.cpp')
-rw-r--r-- | lib/System/Unix/Process.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/System/Unix/Process.cpp b/lib/System/Unix/Process.cpp index c1448de..cccd3ff 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 |