less signals, more flags
@@ -3817,7 +3817,8 @@ static void fio_worker_cleanup(void) {
fio_timer_clear_all();
fio_defer_perform();
if (!fio_data->is_worker) {
- kill(0, SIGINT);
+ fio_cluster_signal_children();
+ fio_defer_perform();
while (wait(NULL) != -1)
;
}
@@ -6206,7 +6207,7 @@ static void fio_cluster_listen_on_close(intptr_t uuid,
(int)getpid());
#endif
if (fio_data->active)
- kill(0, SIGINT);
+ fio_stop();
}
(void)uuid;
}
@@ -6248,7 +6249,6 @@ static void fio_cluster_client_handler(struct cluster_pr_s *pr) {
break;
case FIO_CLUSTER_MSG_SHUTDOWN:
fio_stop();
- kill(getpid(), SIGINT);
case FIO_CLUSTER_MSG_ERROR: /* fallthrough */
case FIO_CLUSTER_MSG_PING: /* fallthrough */
case FIO_CLUSTER_MSG_ROOT: /* fallthrough */
@@ -6503,7 +6503,7 @@ static void fio_pubsub_on_fork(void) {
/** Signals children (or self) to shutdown) - NOT signal safe. */
static void fio_cluster_signal_children(void) {
if (fio_parent_pid() != getpid()) {
- kill(getpid(), SIGINT);
+ fio_stop();
return;
}
fio_cluster_server_sender(fio_msg_internal_create(0, FIO_CLUSTER_MSG_SHUTDOWN,
