caryll / otfcc

Optimized OpenType builder and inspector.
Apache License 2.0
422 stars 63 forks source link

Fix: broken pipe on Linux when stdin is a Linux socket #69

Closed syimyuzya closed 4 years ago

syimyuzya commented 4 years ago

...by making it only freopen stdin on Windows.

AFAIK the binary mode only has effect on Windows but not on POSIX systems, and if stdin is a Linux socket (e.g. when spawned as a Node.js child process), freopen closes it immediately (even if the first argument is NULL) , then otfccbuild hangs after that.