Standard signal handler now also closes stdin when shutting down, to prevent read-loops getting stuck

This commit is contained in:
Thulinma 2022-01-24 14:42:20 +01:00
parent 9fd48f6e2f
commit f9e97a350f

View file

@ -597,6 +597,7 @@ void Util::Config::signal_handler(int signum, siginfo_t *sigInfo, void *ignore){
case SIGHUP:
case SIGTERM:
if (serv_sock_pointer){serv_sock_pointer->close();}
if (stdin){fclose(stdin);}
#if DEBUG >= DLVL_DEVEL
static int ctr = 0;
if (!is_active && ++ctr > 4){BACKTRACE;}