(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
This commit is contained in:
Thomas Quinot 2005-04-12 15:02:57 +00:00
parent 74c77551ed
commit d1ac5c1981

View File

@ -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);
}