1
0
Fork 0
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:
winlin 2016-01-20 14:01:18 +08:00
parent a6dc17a67d
commit ae8bd4c2aa

View file

@ -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++) {