« Previous | Next » 

Revision 8f765069

ID8f7650695fbfd198b4128efee726f07ae6bd8ac5
Parent aa9d0c32
Child 7a1ecaed

Added by Iustin Pop about 16 years ago

Move the daemonize function to utils.py

Currently, in ganeti-noded we have the createDaemon function. Since
we'll need the same in other daemons, we move this function to utils.py

With the move, a few changes were also done:
- change the name to Daemonize()
- add a parameter, logfile, as different daemons will want to log to
different files
- remove the try.. except.. around the fork calls, since they were
only re-raising the OS exception with less data; unless we want to
actually handle fork error (not just re-raising), these try blocks
are not useful
- change the return style at the end of the function

Reviewed-by: imsnah

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences