Recent changes (master)
Jens Axboe <[email protected]> Wed, 1 Jul 2026 06:00:01 -0600
| Newsgroups | org.kernel.vger.fio |
|---|---|
| Message-ID | <[email protected]> |
The following changes since commit 855d7e24e4188a357a150a7569c3150267106630:
t/run-fio-tests: add t/sequence.py (2026-06-26 12:35:04 -0400)
are available in the Git repository at:
git://git.kernel.dk/fio.git master
for you to fetch changes up to f80c50d9ff50a746cd1a111f1986648963bbf7dd:
Merge branch 'fix-issue-1542' of https://github.com/cenhuil/fio (2026-06-30 12:23:27 -0600)
----------------------------------------------------------------
Huilin Cen (1):
server: reap child processes on SIGINT to prevent assertion crash
Jens Axboe (1):
Merge branch 'fix-issue-1542' of https://github.com/cenhuil/fio
server.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
---
Diff of recent changes:
diff --git a/server.c b/server.c
index cde7fdf3..16ccf52b 100644
--- a/server.c
+++ b/server.c
@@ -822,6 +822,30 @@ static void fio_server_fork_item_done(struct fio_fork_item *ffi, bool stop)
free(ffi);
}
+static void fio_server_terminate_fork_items(struct flist_head *list, bool stop)
+{
+ struct flist_head *entry, *tmp;
+ struct fio_fork_item *ffi;
+
+ flist_for_each_safe(entry, tmp, list) {
+ ffi = flist_entry(entry, struct fio_fork_item, list);
+#ifdef WIN32
+ if (!ffi->element.is_thread) {
+ TerminateProcess(ffi->element.hProcess, 0);
+ CloseHandle(ffi->element.hProcess);
+ }
+#else
+ kill(ffi->pid, SIGTERM);
+ do {
+ int ret = waitpid(ffi->pid, NULL, 0);
+ if (ret != -1 || errno != EINTR)
+ break;
+ } while (1);
+#endif
+ fio_server_fork_item_done(ffi, stop);
+ }
+}
+
static void fio_server_check_fork_items(struct flist_head *list, bool stop)
{
struct flist_head *entry, *tmp;
@@ -1402,6 +1426,8 @@ static int handle_connection(struct sk_out *sk_out)
handle_xmits(sk_out);
+ fio_server_terminate_fork_items(&job_list, false);
+
close(sk_out->sk);
sk_out->sk = -1;
__sk_out_drop(sk_out);
@@ -1617,6 +1643,8 @@ static int accept_loop(int listen_sk)
#endif
}
+ fio_server_terminate_fork_items(&conn_list, false);
+
return exitval;
}
@@ -2759,6 +2787,7 @@ static void set_sig_handlers(void)
};
sigaction(SIGINT, &act, NULL);
+ sigaction(SIGTERM, &act, NULL);
/* Windows uses SIGBREAK as a quit signal from other applications */
#ifdef WIN32