1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

For #1634, fix quit by accident SIGTERM while killing FFMPEG. 3.0.124

This commit is contained in:
winlin 2020-03-11 19:04:52 +08:00
parent d5bbf84439
commit 927c0c8e39
4 changed files with 11 additions and 4 deletions

View file

@ -892,6 +892,7 @@ srs_error_t SrsServer::cycle()
void SrsServer::on_signal(int signo)
{
if (signo == SRS_SIGNAL_RELOAD) {
srs_trace("reload config, signo=%d", signo);
signal_reload = true;
return;
}
@ -899,7 +900,7 @@ void SrsServer::on_signal(int signo)
#ifndef SRS_AUTO_GPERF_MC
if (signo == SRS_SIGNAL_REOPEN_LOG) {
_srs_log->reopen();
srs_warn("reopen log file");
srs_warn("reopen log file, signo=%d", signo);
return;
}
#endif
@ -907,7 +908,7 @@ void SrsServer::on_signal(int signo)
#ifdef SRS_AUTO_GPERF_MC
if (signo == SRS_SIGNAL_REOPEN_LOG) {
signal_gmc_stop = true;
srs_warn("for gmc, the SIGUSR1 used as SIGINT");
srs_warn("for gmc, the SIGUSR1 used as SIGINT, signo=%d", signo);
return;
}
#endif
@ -919,7 +920,7 @@ void SrsServer::on_signal(int signo)
if (signo == SIGINT) {
#ifdef SRS_AUTO_GPERF_MC
srs_trace("gmc is on, main cycle will terminate normally.");
srs_trace("gmc is on, main cycle will terminate normally, signo=%d", signo);
signal_gmc_stop = true;
#else
#ifdef SRS_AUTO_MEM_WATCH