mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Ingest: Exit if child process redirect io failed (#2540)
* 修复子进程无法打开日志输出重定向导致的fork错误 srs进程fork后,未能输出重定向而返回错误,导致fork的子进程未能出。 * remove the var child_err * Fixed IO redirection error detection * Fixed BUG where lost during logs on normal start
This commit is contained in:
parent
0859fb5298
commit
a00b4d2014
2 changed files with 32 additions and 16 deletions
|
@ -53,6 +53,9 @@ public:
|
|||
// @param argv the argv for binary path, the argv[0] generally is the binary.
|
||||
// @remark the argv[0] must be the binary.
|
||||
virtual srs_error_t initialize(std::string binary, std::vector<std::string> argv);
|
||||
private:
|
||||
// Redirect standard I/O.
|
||||
virtual srs_error_t redirect_io();
|
||||
public:
|
||||
// Start the process, ignore when already started.
|
||||
virtual srs_error_t start();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue