src: remove overzealous tcsetattr error check by bnoordhuis · Pull Request #58200 · nodejs/node
Node calls tcsetattr on exit to reset the tty to its state on program start. Good idea in general but tcsetattr can fail for a number of reasons and since there really isn't anything we can do about it at that point, simply ignore the error instead of aborting with an inscrutable error message. Most of the time it'll be fine because the most common failure is when the user has already logged off and there isn't anything to restore in the first place. Fixes: nodejs#51519
added
c++
labels
May 6, 2025
daeyeon
added
author ready
labels
May 6, 2025targos pushed a commit that referenced this pull request
May 16, 2025Node calls tcsetattr on exit to reset the tty to its state on program start. Good idea in general but tcsetattr can fail for a number of reasons and since there really isn't anything we can do about it at that point, simply ignore the error instead of aborting with an inscrutable error message. Most of the time it'll be fine because the most common failure is when the user has already logged off and there isn't anything to restore in the first place. Fixes: #51519 PR-URL: #58200 Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
aduh95 pushed a commit that referenced this pull request
Jun 10, 2025Node calls tcsetattr on exit to reset the tty to its state on program start. Good idea in general but tcsetattr can fail for a number of reasons and since there really isn't anything we can do about it at that point, simply ignore the error instead of aborting with an inscrutable error message. Most of the time it'll be fine because the most common failure is when the user has already logged off and there isn't anything to restore in the first place. Fixes: #51519 PR-URL: #58200 Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters