Code

Check the return value of write() to satisfy GCC's unused-result checks.