papandreou/node-pngquant — pull request #4 by freezy (2014-11-07 22:14:35+00:00)
Title: Added error handler for stdin and stdout.

I have unhandled stream errors in my tests recently. Something to do with concurrency, the PNG is deleted just before or while launching `pngquant`, which breaks the whole test suite because the error isn't treatable.

This patch properly adds an error handler on the process' `stdin` and `stdout`, making these kind of errors treatable for the caller.