junneyang / zumastor

Automatically exported from code.google.com/p/zumastor
0 stars 1 forks source link

Daemonize trying to do too much #162

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Running ddsnap server --foreground produces an infinite series of:

   Tue Jul  1 16:29:31 2008: [9470] snap_server: Caught signal 0
   Tue Jul  1 16:29:31 2008: [9470] snap_server: I don't handle signal 0

The issue is that the daemonize function also sets up signals, but this
also needs to be done when the server is running in foreground.  So the
signal setup should be removed from daemonize and done separately in each
of the three servers that use daemonize.

There is also a bug in failing to distinguish activity on the signalfd from
an error on the signalfd (poll on fd that is not open) which caused the
misleading output above.

Original issue reported on code.google.com by Daniel.R...@gmail.com on 1 Jul 2008 at 11:45