diff --git a/src/node.cc b/src/node.cc index 5b9fff1dd34a14..5118feed602a93 100644 --- a/src/node.cc +++ b/src/node.cc @@ -98,9 +98,6 @@ #include // STDIN_FILENO, STDERR_FILENO #endif -#ifdef __PASE__ -#include // ioctl -#endif // ========== global C++ headers ========== #include @@ -555,14 +552,7 @@ inline void PlatformInit() { while (s.flags == -1 && errno == EINTR); // NOLINT CHECK_NE(s.flags, -1); -#ifdef __PASE__ - // On IBMi PASE isatty() always returns true for stdin, stdout and stderr. - // Use ioctl() instead to identify whether it's actually a TTY. - if (ioctl(fd, TXISATTY + 0x81, nullptr) == -1 && errno == ENOTTY) - continue; -#else - if (!isatty(fd)) continue; -#endif + if (uv_guess_handle(fd) != UV_TTY) continue; s.isatty = true; do