summaryrefslogtreecommitdiffstats
path: root/usr.sbin/yppush
diff options
context:
space:
mode:
authorthomas <thomas@FreeBSD.org>2005-04-12 15:02:57 +0000
committerthomas <thomas@FreeBSD.org>2005-04-12 15:02:57 +0000
commit31e06cd56216026af21e143cdaa1918827919485 (patch)
tree75f925cafc9174d6e1b3799c455860123bd7ab08 /usr.sbin/yppush
parenta51295b62f63811a87cff31e47cb2dd41628114f (diff)
downloadFreeBSD-src-31e06cd56216026af21e143cdaa1918827919485.zip
FreeBSD-src-31e06cd56216026af21e143cdaa1918827919485.tar.gz
(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
Diffstat (limited to 'usr.sbin/yppush')
-rw-r--r--usr.sbin/yppush/yppush_main.c2
1 files changed, 1 insertions, 1 deletions
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);
}
OpenPOWER on IntegriCloud