yppush_main.c yppush_exit() recursion prevention
Thomas Quinot
thomas at FreeBSD.ORG
Fri Apr 1 06:35:41 PST 2005
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-audit/attachments/20050401/7bde83d1/attachment.bin
More information about the freebsd-audit
mailing list