-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
release: Don't let node mess up stdio
Node leaves stdio file descriptors in non-blocking mode when exiting. This has been reported, fixed, unfixed, ad nauseum. nodejs/node#14752 nodejs/node#17737 nodejs/node#20592 nodejs/node#21257 Stolen from cockpit-project/cockpit@ef50d97cf4
- Loading branch information
1 parent
5732e22
commit 159a916
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/sh | ||
|
||
# This is certified, A-grade, high quality turd polish. Node leaves | ||
# stdio file descriptors in non-blocking mode when exiting. This has | ||
# been reported, fixed, unfixed, ad nauseum. | ||
# | ||
# https://github.com/nodejs/node/issues/14752 | ||
# https://github.com/nodejs/node/pull/17737 | ||
# https://github.com/nodejs/node/pull/20592 | ||
# https://github.com/nodejs/node/pull/21257 | ||
# | ||
# It's starting to fester. | ||
|
||
OUT=$(/usr/bin/node.real "$@" 2>&1 </dev/null) | ||
ret=$? | ||
echo -n "$OUT" | ||
exit $ret |