libfio: don't sent KILL signal to own process from signal handler

Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/libfio.c b/libfio.c
index 0cfd7f6..ee5a0ea 100644
--- a/libfio.c
+++ b/libfio.c
@@ -162,6 +162,7 @@
 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 @@
 				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))