mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2025-02-02 15:07:36 -05:00
parent
00f8e94257
commit
d42646541c
@ -147,6 +147,7 @@ AC_TYPE_PID_T
|
|||||||
AC_TYPE_SIZE_T
|
AC_TYPE_SIZE_T
|
||||||
AC_TYPE_SSIZE_T
|
AC_TYPE_SSIZE_T
|
||||||
AC_TYPE_UID_T
|
AC_TYPE_UID_T
|
||||||
|
AC_CHECK_TYPES([sig_atomic_t], [], [], [[#include <signal.h>]])
|
||||||
|
|
||||||
dnl Checks for required libraries
|
dnl Checks for required libraries
|
||||||
|
|
||||||
|
@ -21,6 +21,8 @@
|
|||||||
|
|
||||||
#define ICECAST_VERSION_STRING "Icecast " PACKAGE_VERSION
|
#define ICECAST_VERSION_STRING "Icecast " PACKAGE_VERSION
|
||||||
|
|
||||||
|
#include <signal.h>
|
||||||
|
|
||||||
#include <igloo/igloo.h>
|
#include <igloo/igloo.h>
|
||||||
|
|
||||||
#include "common/thread/thread.h"
|
#include "common/thread/thread.h"
|
||||||
@ -37,7 +39,12 @@ typedef struct ice_global_tag
|
|||||||
time_t sources_update;
|
time_t sources_update;
|
||||||
int sources_legacy;
|
int sources_legacy;
|
||||||
int clients;
|
int clients;
|
||||||
int schedule_config_reread;
|
|
||||||
|
#ifdef HAVE_SIG_ATOMIC_T
|
||||||
|
volatile sig_atomic_t schedule_config_reread;
|
||||||
|
#else
|
||||||
|
volatile int schedule_config_reread;
|
||||||
|
#endif
|
||||||
|
|
||||||
avl_tree *source_tree;
|
avl_tree *source_tree;
|
||||||
/* for locally defined relays */
|
/* for locally defined relays */
|
||||||
|
@ -54,11 +54,7 @@ void _sig_ignore(int signo)
|
|||||||
|
|
||||||
void _sig_hup(int signo)
|
void _sig_hup(int signo)
|
||||||
{
|
{
|
||||||
ICECAST_LOG_INFO("Caught signal %d, scheduling config re-read...", signo);
|
global.schedule_config_reread = 1;
|
||||||
|
|
||||||
global_lock();
|
|
||||||
global . schedule_config_reread = 1;
|
|
||||||
global_unlock();
|
|
||||||
|
|
||||||
/* some OSes require us to reattach the signal handler */
|
/* some OSes require us to reattach the signal handler */
|
||||||
signal(SIGHUP, _sig_hup);
|
signal(SIGHUP, _sig_hup);
|
||||||
|
@ -883,6 +883,7 @@ static void *_slave_thread(void *arg)
|
|||||||
/* re-read xml file if requested */
|
/* re-read xml file if requested */
|
||||||
global_lock();
|
global_lock();
|
||||||
if (global.schedule_config_reread) {
|
if (global.schedule_config_reread) {
|
||||||
|
ICECAST_LOG_INFO("Reloading config for reload was queued");
|
||||||
config_reread_config();
|
config_reread_config();
|
||||||
global.schedule_config_reread = 0;
|
global.schedule_config_reread = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user