]> git.pond.sub.org Git - empserver/commit
Make io_output() return a sane value
authorMarkus Armbruster <armbru@pond.sub.org>
Fri, 24 Apr 2009 18:10:00 +0000 (20:10 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 19 Jul 2009 18:11:52 +0000 (14:11 -0400)
commit6f6c90d4068c8f3cf044f8f8644e9e23dec70f2b
tree2d55135f425352a1b5b0633e90924269e765c41c
parent328adc6fac0b04cf8488008a04f3c074c506fbb1
Make io_output() return a sane value

Return number of bytes written on success, -1 on error.  In
particular, return zero when nothing was written because the queue was
empty, or because the write slept and got woken up, or because the
write refused to sleep.

Before, it instead returned the number of bytes remaining to be
written when empth_select() failed, when woken up from sleep, or
refusing to sleep.  You couldn't tell from the return value whether
the call made progress writing out the queue.

The current callers don't actually notice the change.
src/lib/empthread/io.c