(even though these are nonblocking calls and EINTR shouldn't be possible). Also, log what error we're seing if drain_fn fails.