To alter the program to exit successfully in the case of a closed pipe, try:
process.stdout.on('error', function( err ) {
if (err.code == "EPIPE") {
process.exit(0);
}
});
To alter the program to exit successfully in the case of a closed pipe, try:
process.stdout.on('error', function( err ) {
if (err.code == "EPIPE") {
process.exit(0);
}
});