mogstored: fix kqueue usage with daemonization
commitd8de2baa06cca3fd4059ad580b39541acea3e4d8
authorEric Wong <normalperson@yhbt.net>
Fri, 18 Jan 2013 09:42:44 +0000 (18 09:42 +0000)
committerEric Wong <normalperson@yhbt.net>
Fri, 18 Jan 2013 20:32:50 +0000 (18 20:32 +0000)
treec50f32511403a9cdad8fd63153c1121fef7ed68f
parentc23cc6b0c29ee2a608f3ec2bc51a93d99e41efd1
mogstored: fix kqueue usage with daemonization

Calling Mogstored::HTTPServer::Perlbal->start() creates a kqueue
descriptor.  kqueue descriptors are invalidated across fork,
so we must avoid kqueue creation until after daemonization.

We continue starting non-Perlbal HTTP servers before
daemonization, as error reporting can be easier if stderr/stdout
are not redirected to /dev/null.

ref: http://code.google.com/p/mogilefs/issues/detail?id=72
Cc: to.my.trociny@gmail.com
mogstored