close stdin and stdout descriptors by default

This commit is contained in:
Nikos Mavrogiannopoulos
2015-02-27 22:44:44 +01:00
parent c0838241d0
commit 58a3c7fd58

View File

@@ -1069,6 +1069,10 @@ int main(int argc, char** argv)
}
#endif
/* we don't need them */
close(STDIN_FILENO);
close(STDOUT_FILENO);
sigprocmask(SIG_BLOCK, &blockset, &sig_default_set);
alarm(MAINTAINANCE_TIME(s));