title: how to reopen the stdout file after closing all the descriptors?
body: <p>I am having a problem in daemonize program. The problem is after closing all the opened descriptors, i need to reopen the stdout file to print the message.</p>
  
  <p>I am having one way. But that is not working. </p>
  
  <p>The way is duplicate the stdout descriptor using dup and reopen that. But the deamonize function is called it closes all the file descriptors. So, that duplicate file descriptor is also closed.</p>
  
  <p>Can anyone please help me to do that.</p>