Used glibc to provide mt-blocking stdio for fds.