-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cat <(node -v)
never exits after >= 12.5.0
#28530
Comments
cat <(node -v)
never exitscat <(node -v)
never exits after >= 12.5.0
I can reproduce. It's caused by #24260 except not really - the I can't reproduce on Linux so this is with 99% certainty a bug in macOS's implementation of edit: libc turns |
This minimal C test case shows the exact same behavior: #include <err.h>
#include <termios.h>
int
main(void)
{
struct termios t;
if (tcgetattr(0, &t))
err(1, "tcgetattr");
if (tcsetattr(0, TCSANOW, &t))
err(1, "tcsetattr");
return 0;
}
IOW, not a Node.js bug. I'll see if I can devise a workaround. |
Okay, I figured it out. The Apparently A fix is on the way. |
We might be a background job that doesn't own the TTY so block SIGTTOU before making the tcsetattr() call, otherwise that signal suspends us. This is a better fix than PR nodejs#28490 for issue nodejs#28479. Fixes: nodejs#28530 Fixes: nodejs#28479 Refs: nodejs#28490
FWIW, I can repro on Linux, maybe because I'm using zsh not bash. |
We might be a background job that doesn't own the TTY so block SIGTTOU before making the tcsetattr() call, otherwise that signal suspends us. This is a better fix than PR #28490 for issue #28479. Fixes: #28530 Fixes: #28479 Refs: #28490 PR-URL: #28535 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Simply run
cat <(node -v)
related: ohmyzsh/ohmyzsh#7972
The text was updated successfully, but these errors were encountered: