master sends terminating signal to slaves if exit