should never close the fd 3+, for it myabe used.

pull/609/head
winlin 9 years ago
parent a6dc17a67d
commit ae8bd4c2aa

@ -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…
Cancel
Save