Skip to content

Commit

Permalink
For #1634, fix quit by accident SIGTERM while killing FFMPEG. 3.0.124
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Mar 11, 2020
1 parent d5bbf84 commit 927c0c8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions trunk/src/app/srs_app_process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
7 changes: 4 additions & 3 deletions trunk/src/app/srs_app_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -892,22 +892,23 @@ 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;
}

#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

#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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion trunk/src/core/srs_core_version3.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 927c0c8

Please sign in to comment.