]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
libevent signal problem has different signal handler registrations, and thus
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 13 Nov 2007 16:15:04 +0000 (16:15 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 13 Nov 2007 16:15:04 +0000 (16:15 +0000)
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

doc/Changelog
testcode/fake_event.c

index 01f94f4092b03ae5f567b838b7c8292a269b7c56..8322a462e8a94a5676260da1c0b9e5a0a7fbbb6a 100644 (file)
@@ -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
index 98e16bf9bff3d6ea74951fa823a8394bee22a9dd..6f0a01eeb9f6b1ae6ef65485ef9f219fb654eb4a 100644 (file)
@@ -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