[LTP] [PATCH] ltp-pan: Send SIGKILL instead of SIGALRM to kill the child process

Zhao Gongyi zhaogongyi@bytedance.com
Fri Mar 3 08:52:58 CET 2023


From: zhaogongyi <zhaogongyi@bytedance.com>

When PAN stop Alarm was received, and the testcase blocked the signal SIGALRM,
PAN will be hung up until the testcase exit. So it is necessary to send SIGKILL
instead of SIGALRM to kill the running process.

Signed-off-by: Zhao Gongyi <zhaogongyi@bytedance.com>
---
 pan/ltp-pan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pan/ltp-pan.c b/pan/ltp-pan.c
index 0bdb51477..b07a7ec50 100644
--- a/pan/ltp-pan.c
+++ b/pan/ltp-pan.c
@@ -685,7 +685,7 @@ propagate_signal(struct tag_pgrp *running, int keep_active,

 	if (rec_signal == SIGALRM) {
 		printf("PAN stop Alarm was received\n");
-		rec_signal = SIGTERM;
+		send_signal = SIGKILL;
 	}

 	for (i = 0; i < keep_active; ++i) {
--
2.37.1 (Apple Git-137.1)



More information about the ltp mailing list