avoid a deadlock for errors in reduce.

This needs to be fixed. Probably need a rewrite of the
backends from scratch with os.fork(), and
use the SIGTRAP signal + additional semaphore release
for more reliable slave termination.