1
0
Fork 0
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:
winlin 2015-05-30 09:58:17 +08:00
parent db57a519a9
commit 567d84e997
5 changed files with 49 additions and 11 deletions

View file

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