File tree Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change 109
109
#include < unistd.h> // STDIN_FILENO, STDERR_FILENO
110
110
#endif
111
111
112
- #ifdef __PASE__
113
- #include < sys/ioctl.h> // ioctl
114
- #endif
115
112
// ========== global C++ headers ==========
116
113
117
114
#include < cerrno>
@@ -589,14 +586,7 @@ inline void PlatformInit() {
589
586
while (s.flags == -1 && errno == EINTR); // NOLINT
590
587
CHECK_NE (s.flags , -1 );
591
588
592
- #ifdef __PASE__
593
- // On IBMi PASE isatty() always returns true for stdin, stdout and stderr.
594
- // Use ioctl() instead to identify whether it's actually a TTY.
595
- if (ioctl (fd, TXISATTY + 0x81 , nullptr ) == -1 && errno == ENOTTY)
596
- continue ;
597
- #else
598
- if (!isatty (fd)) continue ;
599
- #endif
589
+ if (uv_guess_handle (fd) != UV_TTY) continue ;
600
590
s.isatty = true ;
601
591
602
592
do
You can’t perform that action at this time.
0 commit comments