BUG/MEDIUM: mworker: segfault receiving SIGUSR1 followed by SIGTERM.

This bug appeared only if nbthread > 1. Handling the pipe with the
master, multiple threads of the same worker could process the deinit().

In addition, deinit() was called while some other threads were still
performing some tasks.

This patch assign the handler of the pipe with master to only the first
thread and removes the call to deinit() before exiting with an error.

This patch should be backported in v1.8.
1 file changed