| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Presumably this is related to https://www.ibm.com/support/pages/nodejs-failure-pase-error-560-assertion? (And, if so, setting the PASE_STDIO_ISATTY environment variable in code is not an option?) |
Sorry, something went wrong.
Yes, that is the issue. |
Sorry, something went wrong.
|
Somewhat related question: is it worth teaching uv_guess_handle() about this? |
Sorry, something went wrong.
|
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 |
Sorry, something went wrong.
Sorry, something went wrong.
Hello @cjihrig , Do you know any API or test case using uv_guess_handle()? I found test/parallel/test-ttywrap-invalid-fd.js but it seems to be an internal case that I can not directly run? |
Sorry, something went wrong.
@dmabupt If you're not running via the test runner (i.e. tools/test.py parallel/test-ttywrap-invalid-fd) you need to append the flags from the // Flags: comment (i.e. node --expose-internals test/parallel/test-ttywrap-invalid-fd.js). libuv has its own tests that use uv_guess_handle(). See build instructions and running tests for how to build libuv and run tests (I assume you already know this since you've already contributed to libuv). |
Sorry, something went wrong.
|
@dmabupt the documentation for uv_guess_handle() states:
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, uv_guess_handle() could then be used to clean this code up a little bit (one less #ifdef). |
Sorry, something went wrong.
Thanks for the information. I have submiited a PR for that. |
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
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 -- if (ioctl(fd, TXISATTY + 0x81, nullptr) == -1 && errno == ENOTTY)
continue;
to specifically detect the ENOTTY environment. |
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
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>
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>
| Back | FazBrowse Home | New Git URL |
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