0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-10-06 07:38:52 +02:00

authd: use atexit() hook to attempt to destroy providers

This commit is contained in:
Elizabeth Myers 2016-03-28 19:38:43 -05:00
parent 34b96d7f76
commit dfd7d4b103

View file

@ -187,6 +187,12 @@ setup_signals(void)
#endif #endif
} }
static void
do_exit(void)
{
destroy_providers();
}
int int
main(int argc, char *argv[]) main(int argc, char *argv[])
{ {
@ -208,9 +214,9 @@ main(int argc, char *argv[])
init_providers(); init_providers();
rb_init_prng(NULL, RB_PRNG_DEFAULT); rb_init_prng(NULL, RB_PRNG_DEFAULT);
rb_helper_loop(authd_helper, 0); atexit(do_exit);
destroy_providers(); rb_helper_loop(authd_helper, 0);
return 0; return 0;
} }