From 31e06cd56216026af21e143cdaa1918827919485 Mon Sep 17 00:00:00 2001 From: thomas Date: Tue, 12 Apr 2005 15:02:57 +0000 Subject: (handler): When exitting upon an abnormal signal, yppush_exit() should not attempt to clear its pending jobs list, as this could trigger another signal, and cause an infinite recursion. What yppush_exit() tests in order to determine whether to flush pending jobs is the yppush_joblist chained list, so this is what needs to be cleared in that case (not the yppush_jobs counter). Reviewed by: audit@ (no objection) MFC after: 2 weeks --- usr.sbin/yppush/yppush_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/yppush/yppush_main.c b/usr.sbin/yppush/yppush_main.c index 9a37a42..951f413 100644 --- a/usr.sbin/yppush/yppush_main.c +++ b/usr.sbin/yppush/yppush_main.c @@ -208,7 +208,7 @@ static void handler(int sig) { if (sig == SIGTERM || sig == SIGINT || sig == SIGABRT) { - yppush_jobs = 0; + yppush_joblist = NULL; yppush_exit(1); } -- cgit v1.1