Just use: require("sigpipe"); Now fs.writeSync to fd 1 and console.log will silently exit with code 141 in case of EPIPE. This program is public domain.2 dependents1 version@infinitebrahmanuniverse/nolb-sig@everything-registry/sub-chunk-27591.0.07 years ago