Commit cc931660 authored by Philipp Schafft's avatar Philipp Schafft 🦁

Fix: Avoid invalid locking in signal handlers.

This should also be fixed in master.

Closes: #2299
parent 1a4bb886
......@@ -343,6 +343,8 @@ static void _server_proc(void)
}
connection_accept_loop();
ICECAST_LOG_INFO("Caught halt request, shutting down...");
connection_setup_sockets (NULL);
}
......
......@@ -55,11 +55,7 @@ void _sig_ignore(int signo)
void _sig_hup(int signo)
{
ICECAST_LOG_INFO("Caught signal %d, scheduling config re-read...", signo);
global_lock();
global . schedule_config_reread = 1;
global_unlock();
/* some OSes require us to reattach the signal handler */
signal(SIGHUP, _sig_hup);
......@@ -67,8 +63,6 @@ void _sig_hup(int signo)
void _sig_die(int signo)
{
ICECAST_LOG_INFO("Caught signal %d, shutting down...", signo);
/* inform the server to start shutting down */
global.running = ICECAST_HALTING;
}
......
......@@ -746,8 +746,9 @@ static void *_slave_thread(void *arg)
global_lock();
if (global . schedule_config_reread)
{
event_config_read (NULL);
global . schedule_config_reread = 0;
global.schedule_config_reread = 0;
ICECAST_LOG_INFO("Caught config reload request, re-reading config...");
event_config_read(NULL);
}
global_unlock();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment