@ -1791,10 +1791,17 @@ static struct sigaction urg_handler = {
static void _hup_handler ( int num )
static void _hup_handler ( int num )
{
{
int a = 0 , save_errno = errno ;
int a = 0 ;
printf ( " Received HUP signal -- Reloading configs \n " ) ;
int save_errno = errno ;
if ( restartnow )
if ( restartnow ) {
if ( el ) {
el_end ( el ) ;
}
execvp ( _argv [ 0 ] , _argv ) ;
execvp ( _argv [ 0 ] , _argv ) ;
}
printf ( " Received HUP signal -- Reloading configs \n " ) ;
sig_flags . need_reload = 1 ;
sig_flags . need_reload = 1 ;
if ( sig_alert_pipe [ 1 ] ! = - 1 ) {
if ( sig_alert_pipe [ 1 ] ! = - 1 ) {
if ( write ( sig_alert_pipe [ 1 ] , & a , sizeof ( a ) ) < 0 ) {
if ( write ( sig_alert_pipe [ 1 ] , & a , sizeof ( a ) ) < 0 ) {
@ -2137,7 +2144,7 @@ static void really_quit(int num, shutdown_nice_t niceness, int restart)
if ( el_hist ! = NULL ) {
if ( el_hist ! = NULL ) {
history_end ( el_hist ) ;
history_end ( el_hist ) ;
}
}
} else {
} else if ( ! restart ) {
sig_flags . need_el_end = 1 ;
sig_flags . need_el_end = 1 ;
pthread_kill ( consolethread , SIGURG ) ;
pthread_kill ( consolethread , SIGURG ) ;
}
}