We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6d6a3e4 commit 6534c6cCopy full SHA for 6534c6c
src/node.cc
@@ -109,9 +109,6 @@
109
#include <unistd.h> // STDIN_FILENO, STDERR_FILENO
110
#endif
111
112
-#ifdef __PASE__
113
-#include <sys/ioctl.h> // ioctl
114
-#endif
115
// ========== global C++ headers ==========
116
117
#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
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
+ if (uv_guess_handle(fd) != UV_TTY) continue;
600
s.isatty = true;
601
602
do
0 commit comments