The signal handler in the isc_loop would wait for all the work to finish
before interrupting the signing. Add teardown handlers via
isc_loopmgr_teardown() to signal the assignwork() it should stop signing
and bail-out early.
NOTE: The dnssec-signzone binary still can't be interrupted during zone
loading, zone cleaning, nsec(3) chain generation or zone writing. This
might get addressed in the future if it becomes a problem.
}
}
+static void
+abortwork(void *arg) {
+ UNUSED(arg);
+
+ atomic_store(&shuttingdown, true);
+}
+
/*%
* Assigns a node to a worker thread. This is protected by the main task's
* lock.
* processors if possible.
*/
isc_loopmgr_setup(loopmgr, assignwork, NULL);
+ isc_loopmgr_teardown(loopmgr, abortwork, NULL);
isc_loopmgr_run(loopmgr);
if (!atomic_load(&finished)) {
fatal("process aborted by user");
}
}
- atomic_store(&shuttingdown, true);
postsign();
TIME_NOW(&sign_finish);