From: Jens Axboe Date: Thu, 29 Nov 2012 13:24:34 +0000 (+0100) Subject: libfio: don't sent KILL signal to own process from signal handler X-Git-Tag: fio-2.0.12~45 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=41fa20ec4b70d727128b0aa72640e53817d12cda libfio: don't sent KILL signal to own process from signal handler Signed-off-by: Jens Axboe --- 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))