According to `man 3 errno`: ``` The value of errno is never set to zero by any system call or library function. ``` So we must set it to 0 ourselves before each `read` and `write` call to ensure we don't get stuck in an error loop.