Date: Fri, 1 Apr 2005 16:35:39 +0200 From: Thomas Quinot <thomas@FreeBSD.ORG> To: freebsd-audit@freebsd.org Subject: yppush_main.c yppush_exit() recursion prevention Message-ID: <20050401143539.GA33480@melusine.cuivre.fr.eu.org>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
I intend to commit the following to HEAD in the forthcoming days,
unless there is an objection to this change.
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).
Index: yppush_main.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/yppush/yppush_main.c,v
retrieving revision 1.19
diff -u -r1.19 yppush_main.c
--- yppush_main.c 17 Oct 2004 19:33:33 -0000 1.19
+++ yppush_main.c 24 Dec 2004 15:38:59 -0000
@@ -208,7 +208,7 @@
handler(int sig)
{
if (sig == SIGTERM || sig == SIGINT || sig == SIGABRT) {
- yppush_jobs = 0;
+ yppush_joblist = NULL;
yppush_exit(1);
}
Thomas.
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (FreeBSD)
iD8DBQFCTVw6AE1UuDk9JGkRAmHuAJ4wNnQxlJZ0bXjEd8QKhE9nqedUqgCcDMk7
YGzbL42LcB36zZmcskUO138=
=dygv
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050401143539.GA33480>
