diff mbox series

ltp-pan: Send SIGKILL instead of SIGALRM to kill the child process

Message ID 20230303075258.1066-1-zhaogongyi@bytedance.com
State Rejected
Headers show
Series ltp-pan: Send SIGKILL instead of SIGALRM to kill the child process | expand

Commit Message

Zhao Gongyi March 3, 2023, 7:52 a.m. UTC
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(-)

--
2.37.1 (Apple Git-137.1)

Comments

Cyril Hrubis March 6, 2023, 3:12 p.m. UTC | #1
Hi!
> 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.

The ltp-pan is deprecated and the latest LTP release included runltp-ng; a
modern replacement for the runltp script + ltp-pan. Have you tried
runltp-ng?

It's not worth investing time into ltp-pan that will be eventually
removed.
diff mbox series

Patch

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) {