Without a stdin 'error' listener, a broken pipe or parent-process crash
causes Node to emit an unhandled error event on the stream, which becomes
an uncaught exception and crashes the hook with a non-zero exit code.
Add process.stdin.on('error', () => process.exit(0)) before the data/end
listeners. Exiting 0 on error keeps the hook contract: always exit cleanly,
never block session start.
Fixes #147