Improve shutdown signal safeness

The signal handler no longer acquires the service list lock which removes
a number of deadlock possibilities from the shutdown process. Instead, a
global shutdown flag is set that serves the same purpose as the individual
service shutdown flags did.
This commit is contained in:
Markus Mäkelä
2018-08-01 12:59:01 +03:00
parent 8a248dd930
commit 359f61c73b
5 changed files with 11 additions and 14 deletions

View File

@ -463,7 +463,7 @@ avro_binlog_end_t avro_read_all_events(Avro *router)
ss_dassert(router->binlog_fd != -1);
while (!router->service->svc_do_shutdown)
while (!service_should_stop)
{
avro_binlog_end_t rc;
REP_HEADER hdr;