|
@@ -25,7 +25,6 @@ static void close_highfds_except(int exceptfd)
|
|
|
// Find the max fd number
|
|
// Find the max fd number
|
|
|
struct rlimit limit;
|
|
struct rlimit limit;
|
|
|
getrlimit(RLIMIT_NOFILE, &limit);
|
|
getrlimit(RLIMIT_NOFILE, &limit);
|
|
|
- printf("Closing up to %lu\n", (unsigned long)limit.rlim_cur);
|
|
|
|
|
for (int fd = 3; fd < limit.rlim_cur; ++fd) {
|
|
for (int fd = 3; fd < limit.rlim_cur; ++fd) {
|
|
|
if (fd != exceptfd) {
|
|
if (fd != exceptfd) {
|
|
|
// There's no ill effect from closing a non-open fd, so just
|
|
// There's no ill effect from closing a non-open fd, so just
|
|
@@ -124,7 +123,7 @@ int main(int argc, char **argv)
|
|
|
close(controllerfds[0]);
|
|
close(controllerfds[0]);
|
|
|
boundaddr[res] = '\0';
|
|
boundaddr[res] = '\0';
|
|
|
|
|
|
|
|
- std::cerr << "Child reports controller bound to " << boundaddr << ":" << boundport << "\n";
|
|
|
|
|
|
|
+ std::cerr << "Parent reports controller bound to " << boundaddr << ":" << boundport << "\n";
|
|
|
|
|
|
|
|
char portstr[10];
|
|
char portstr[10];
|
|
|
sprintf(portstr, "%hu", boundport);
|
|
sprintf(portstr, "%hu", boundport);
|