mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
should never close the fd 3+, for it myabe used.
This commit is contained in:
parent
a6dc17a67d
commit
ae8bd4c2aa
1 changed files with 3 additions and 6 deletions
|
@ -211,6 +211,9 @@ int SrsProcess::start()
|
|||
}
|
||||
}
|
||||
|
||||
// should never close the fd 3+, for it myabe used.
|
||||
// for fd should close at exec, use fnctl to set it.
|
||||
|
||||
// log basic info
|
||||
if (true) {
|
||||
fprintf(stderr, "\n");
|
||||
|
@ -220,12 +223,6 @@ int SrsProcess::start()
|
|||
fprintf(stderr, "process actual cli: %s\n", actual_cli.c_str());
|
||||
}
|
||||
|
||||
// close other fds
|
||||
// TODO: do in right way.
|
||||
for (int i = 3; i < 1024; i++) {
|
||||
::close(i);
|
||||
}
|
||||
|
||||
// memory leak in child process, it's ok.
|
||||
char** charpv_params = new char*[params.size() + 1];
|
||||
for (int i = 0; i < (int)params.size(); i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue