taskd.pl: eliminate race conditions
A signal could arrive after having already checked for
it. If that happened it would take 30 seconds before
the condition would be noticed.
Although the window of opportunity is quite small, the
race did get lost on occasion.
Eliminate the race entirely by using a pipe write
or sigsuspend so the signal is always noticed right
away.
This does not, however, change the fact that it will
still take up to 30 seconds to notice a dead control
pipe. That's not a problem because that's an
exceptional condition (taskd.pl was terminated by
a signal).
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>