Replace buffered IO (fopen) with unbuffered IO (open)
The buffered IO is part of C standard, while the unbuffered IO is part of POSIX. We would just need to create a compatibility layer for non-POSIX systems. But otherwise, I see no strong reason for using buffered IO in low level daemons.