On Mon, Oct 11, 2010 at 11:50 PM, Erik Faye-Lund [off-list ref] wrote:
quoted hunk ↗ jump to hunk
@@ -1168,11 +1185,13 @@ int main(int argc, char **argv)
return execute();
}
+#ifndef NO_POSIX_GOODIES
if (detach) {
daemonize();
loginfo("Ready to rumble");
}
else
+#endif
sanitize_stdfds();
Does anyone know what the call to sanitize_stdfds() is good for? I
tried searching the mailing list, but the discussion on the patch that
introduced it seems to only discuss how to implement
sanitize_stdfds(), not why...
I understand that it might be beneficial in the --detach code-path,
but how can stdint, stdout or stderr be closed in this code-path?
(CC'ed Matthias, who wrote the code)