From: Wouter Wijngaards Date: Tue, 13 Nov 2007 16:15:04 +0000 (+0000) Subject: libevent signal problem has different signal handler registrations, and thus X-Git-Tag: release-0.6~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d7b0d86b09705e63e03d5f52605628d96078444e;p=thirdparty%2Funbound.git libevent signal problem has different signal handler registrations, and thus needs handling in testbound, so that on a good exit, it does the exit. git-svn-id: file:///svn/unbound/trunk@742 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/doc/Changelog b/doc/Changelog index 01f94f409..8322a462e 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,5 +1,6 @@ 13 November 2007: Wouter - remove debug print. + - fixup testbound exit when LIBEVENT_SIGNAL_PROBLEM exists. 12 November 2007: Wouter - fixup signal handling where SIGTERM could be ignored if a SIGHUP diff --git a/testcode/fake_event.c b/testcode/fake_event.c index 98e16bf9b..6f0a01eeb 100644 --- a/testcode/fake_event.c +++ b/testcode/fake_event.c @@ -597,7 +597,9 @@ comm_base_dispatch(struct comm_base* b) { struct replay_runtime* runtime = (struct replay_runtime*)b; run_scenario(runtime); - (*runtime->sig_cb)(SIGTERM, runtime->sig_cb_arg); + if(runtime->sig_cb) + (*runtime->sig_cb)(SIGTERM, runtime->sig_cb_arg); + else exit(0); /* OK exit when LIBEVENT_SIGNAL_PROBLEM exists */ } void