mirror of
https://github.com/matrix-construct/construct
synced 2024-12-27 07:54:05 +01:00
authd: use atexit() hook to attempt to destroy providers
This commit is contained in:
parent
34b96d7f76
commit
dfd7d4b103
1 changed files with 8 additions and 2 deletions
|
@ -187,6 +187,12 @@ setup_signals(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
do_exit(void)
|
||||
{
|
||||
destroy_providers();
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
|
@ -208,9 +214,9 @@ main(int argc, char *argv[])
|
|||
init_providers();
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue