Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign up`cat <(node -v)` never exits after >= 12.5.0 #28530
Comments
This comment has been minimized.
This comment has been minimized.
|
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 comment has been minimized.
This comment has been minimized.
|
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. |
This comment has been minimized.
This comment has been minimized.
|
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
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
This comment has been minimized.
This comment has been minimized.
|
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