mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix #374: when terminate srs, cleanup to ensure FFMPEG quit.
This commit is contained in:
parent
db57a519a9
commit
567d84e997
5 changed files with 49 additions and 11 deletions
|
@ -403,6 +403,10 @@ int SrsFFMPEG::start()
|
|||
|
||||
// child process: ffmpeg encoder engine.
|
||||
if (pid == 0) {
|
||||
// ignore the SIGINT and SIGTERM
|
||||
signal(SIGINT, SIG_IGN);
|
||||
signal(SIGTERM, SIG_IGN);
|
||||
|
||||
// redirect logs to file.
|
||||
int log_fd = -1;
|
||||
int flags = O_CREAT|O_WRONLY|O_APPEND;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue