mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
for #374, use SIGINT then SIGKILL to try to kill FFMPEG gracefullly.
This commit is contained in:
parent
5caafadd45
commit
db57a519a9
4 changed files with 80 additions and 22 deletions
|
@ -80,6 +80,14 @@ extern std::string srs_path_build_timestamp(std::string template_path);
|
|||
extern void srs_parse_endpoint(std::string ip_port, std::string& ip, std::string& port);
|
||||
extern void srs_parse_endpoint(std::string ip_port, std::string& ip, int& port);
|
||||
|
||||
/**
|
||||
* kill the pid by SIGINT, then wait to quit,
|
||||
* kill the pid by SIGKILL again when exceed the timeout.
|
||||
* @param pid the pid to kill. ignore for -1. set to -1 when killed.
|
||||
* @return an int error code.
|
||||
*/
|
||||
extern int srs_kill_forced(int& pid);
|
||||
|
||||
// current process resouce usage.
|
||||
// @see: man getrusage
|
||||
class SrsRusage
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue