Open tangxinfa opened 5 years ago
fork ....
in child process
int max_fd = getdtablesize(); if (max_fd < 0) { max_fd = 1024; } int fd; for (fd = 3; fd <= max_fd; ++fd) { close(fd); }
exec ...
fork ....
in child process
exec ...