]> git.tuebingen.mpg.de Git - paraslash.git/commit
para_write: Return proper error code.
authorAndre Noll <maan@systemlinux.org>
Sun, 20 Feb 2011 18:41:09 +0000 (19:41 +0100)
committerAndre Noll <maan@systemlinux.org>
Sat, 12 Mar 2011 20:37:50 +0000 (21:37 +0100)
commit64a9cf5877ab9ecf6410596d657914f26830d3f7
tree042ebd7eba4b5bca56bf1f035d99d4dc295d992b
parent86611501af20b6b3eee45ac39a1daa7d50ada231
para_write: Return proper error code.

Currently the exit code of para_write is always the value returned
by schedule().  This is zero unless the call to select() fails,
usually does not happen, so errors resulting from the writers do not
cause para_write to exit with a non-zero exit code.

In particular, para_write exits successfully if the underlying
writer(s) nodes could not open their sound device or unregistered
their task due to other errors.

Fix this by investigating each writer node's t->error value after
schedule() has returned. If this value does not correspond to an end
of file condition, the strerror text of this error code is written
to stderr, and para_write exits non-zero.
alsa_write.c
error.h
oss_write.c
write.c