[PATCH] Fix task state testing properly in do_signal_stop()