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 98
98
#include < unistd.h> // STDIN_FILENO, STDERR_FILENO
99
99
#endif
100
100
101
- #ifdef __PASE__
102
- #include < sys/ioctl.h> // ioctl
103
- #endif
104
101
// ========== global C++ headers ==========
105
102
106
103
#include < cerrno>
@@ -555,14 +552,7 @@ inline void PlatformInit() {
555
552
while (s.flags == -1 && errno == EINTR); // NOLINT
556
553
CHECK_NE (s.flags , -1 );
557
554
558
- #ifdef __PASE__
559
- // On IBMi PASE isatty() always returns true for stdin, stdout and stderr.
560
- // Use ioctl() instead to identify whether it's actually a TTY.
561
- if (ioctl (fd, TXISATTY + 0x81 , nullptr ) == -1 && errno == ENOTTY)
562
- continue ;
563
- #else
564
- if (!isatty (fd)) continue ;
565
- #endif
555
+ if (uv_guess_handle (fd) != UV_TTY) continue ;
566
556
s.isatty = true ;
567
557
568
558
do
You can’t perform that action at this time.
0 commit comments