From 41fa20ec4b70d727128b0aa72640e53817d12cda Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 29 Nov 2012 14:24:34 +0100 Subject: [PATCH] libfio: don't sent KILL signal to own process from signal handler Signed-off-by: Jens Axboe --- libfio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libfio.c b/libfio.c index 0cfd7f63..ee5a0ead 100644 --- a/libfio.c +++ b/libfio.c @@ -162,6 +162,7 @@ void td_set_runstate(struct thread_data *td, int runstate) void fio_terminate_threads(int group_id) { struct thread_data *td; + pid_t pid = getpid(); int i; dprint(FD_PROCESS, "terminate group_id=%d\n", group_id); @@ -180,7 +181,7 @@ void fio_terminate_threads(int group_id) continue; else if (td->runstate < TD_RAMP) kill(td->pid, SIGTERM); - else { + else if (pid != td->pid) { struct ioengine_ops *ops = td->io_ops; if (ops && (ops->flags & FIO_SIGTERM)) -- 2.25.1