-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
On receiving SIGWINCH, only stdout has its rows/columns updated or resize event fired #2219
Comments
That is the case, yes, even clearly in the code: https://github.com/nodejs/io.js/blob/master/src/node.js#L626-L628 (Calls this: https://github.com/nodejs/io.js/blob/master/lib/tty.js#L76-L92) And here it is from the I'm guessing it was just forgotten, since |
@iarna if you'd like to make a PR it definitely seems reasonable to fix. :) |
oh hey that is pretty explicit huh =D |
Fixes: nodejs#2219 PR-URL: nodejs#2231 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
It's just an annoyance. I've worked around it by using stdout's info for now, which mostly works. Obviously if stdout is redirected and stderr isn't it means we can't handle resize events for stderr. But having seen the actual code, I can do better than that. Having it fixed in 0.12 / 0.10 doesn't actually stop me from having to work around the bug, which is why I'm meh on back porting the fix. |
I would expect that if both stdout and stderr are bound to
/dev/tty
then resizes would trigger on bothtty
objects, but this is not the case. This can be demonstrated with a simple script:Run and try resizing the window before the timeout. You'll see update events from
stdout
but none fromstderr
.The text was updated successfully, but these errors were encountered: