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

pull/1636/head^2
winlin 5 years ago
parent d5bbf84439
commit 927c0c8e39

@ -146,6 +146,7 @@ For previous versions, please read:
## V3 changes
* v3.0, 2020-03-11, For [#1634][bug #1634], fix quit by accident SIGTERM while killing FFMPEG. 3.0.124
* <strong>v3.0, 2020-03-05, [3.0 beta2(3.0.123)][r3.0b2] released. 122170 lines.</strong>
* v3.0, 2020-02-21, For [#1598][bug #1598], support SLB health checking by TCP. 3.0.123
* v3.0, 2020-02-21, Fix bug for librtmp client ipv4/ipv6 socket. 3.0.122
@ -1660,6 +1661,7 @@ Winlin
[bug #1601]: https://github.com/ossrs/srs/issues/1601
[bug #1579]: https://github.com/ossrs/srs/issues/1579
[bug #1598]: https://github.com/ossrs/srs/issues/1598
[bug #1634]: https://github.com/ossrs/srs/issues/1634
[bug #xxxxxxxxxxxxx]: https://github.com/ossrs/srs/issues/xxxxxxxxxxxxx
[exo #828]: https://github.com/google/ExoPlayer/pull/828

@ -248,6 +248,10 @@ srs_error_t SrsProcess::start()
// parent.
if (pid > 0) {
// Wait for a while for process to really started.
// @see https://github.com/ossrs/srs/issues/1634#issuecomment-597568840
srs_usleep(10 * SRS_UTIME_MILLISECONDS);
is_started = true;
srs_trace("fored process, pid=%d, bin=%s, stdout=%s, stderr=%s, argv=%s",
pid, bin.c_str(), stdout_file.c_str(), stderr_file.c_str(), actual_cli.c_str());

@ -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

@ -24,6 +24,6 @@
#ifndef SRS_CORE_VERSION3_HPP
#define SRS_CORE_VERSION3_HPP
#define SRS_VERSION3_REVISION 123
#define SRS_VERSION3_REVISION 124
#endif

Loading…
Cancel
Save