src: fix the false isatty() issue on IBMi#30829
src: fix the false isatty() issue on IBMi#30829dmabupt wants to merge 1 commit intonodejs:masterfrom dmabupt:ibmi_isatty
Conversation
|
Presumably this is related to https://www.ibm.com/support/pages/nodejs-failure-pase-error-560-assertion? (And, if so, setting the |
Yes, that is the issue. |
|
Somewhat related question: is it worth teaching |
|
There are some linter failures: https://travis-ci.com/nodejs/node/jobs/264279822#L301-L308 Running C++ linter...
src/node.cc:113: Line ends in whitespace. Consider deleting these extra spaces. [whitespace/end_of_line] [4]
src/node.cc:562: Line ends in whitespace. Consider deleting these extra spaces. [whitespace/end_of_line] [4]
src/node.cc:564: Line ends in whitespace. Consider deleting these extra spaces. [whitespace/end_of_line] [4]
src/node.cc:565: Use nullptr instead of NULL [readability/null_usage] [2]
src/node.cc:566: Line ends in whitespace. Consider deleting these extra spaces. [whitespace/end_of_line] [4]
Done processing src/node.cc
Total errors found: 5 |
Hello @cjihrig , Do you know any API or test case using |
@dmabupt If you're not running via the test runner (i.e. libuv has its own tests that use |
|
@dmabupt the documentation for
So I just thought that while you're adding this functionality to Node, it would probably be worthwhile to add it to libuv as well. In fact, |
Thanks for the information. I have submiited a PR for that. |
On IBMi PASE isatty() always returns true for stdin, stdout and stderr. Use ioctl() instead to identify whether it's actually a TTY.
|
I have updated the code to -- to specifically detect the |
On IBMi PASE isatty() always returns true for stdin, stdout and stderr. Use ioctl() instead to identify whether it's actually a TTY. PR-URL: #30829 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
|
Landed in 68874a6 🎉 |
On IBMi PASE isatty() always returns true for stdin, stdout and stderr. Use ioctl() instead to identify whether it's actually a TTY. PR-URL: #30829 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
On IBMi PASE isatty() always returns true for stdin, stdout and stderr. Use ioctl() instead to identify whether it's actually a TTY. PR-URL: #30829 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
This commit reverts nodejs#30829 and uses uv_guess_handle() instead of isatty(). The IBMi changes are no longer required, as of libuv 1.34.1. PR-URL: nodejs#31333 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit reverts #30829 and uses uv_guess_handle() instead of isatty(). The IBMi changes are no longer required, as of libuv 1.34.1. PR-URL: #31333 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
On IBMi PASE isatty() always returns true for stdin, stdout and stderr. Use ioctl() instead to identify whether it's actually a TTY. PR-URL: #30829 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
This commit reverts #30829 and uses uv_guess_handle() instead of isatty(). The IBMi changes are no longer required, as of libuv 1.34.1. PR-URL: #31333 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit reverts #30829 and uses uv_guess_handle() instead of isatty(). The IBMi changes are no longer required, as of libuv 1.34.1. PR-URL: #31333 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
IBMi PASE always says it is a tty terminal.
For ssh terminals it is true, but for terminals like TN5250 it is not.
Need to identify whether it is actually in a TTY or not.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes