Hotshot
I tried what you said, but as you mentioned, the solution you suggested works differntly on different systems, and I wasn't lucky here, so I tried sending SIGPIPE to the process and catch it there, in my sigPipe handler I printed a message to the user and comitted suicide with: