We were verifying that there was only 1 thread (the presumably main()) when
we call daemonize. However, with the new logging code, we stop a thread
right before the check, and /proc apparently updates asynchronously such
that our attempt to count running threads gives us a bad answer.
Just remove this kludgey check; we'll have to catch this class of bugs
the hard way.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
// stop log thread
g_ceph_context->_log->stop();
- int num_threads = Thread::get_num_threads();
- if (num_threads > 1) {
- derr << "global_init_daemonize: BUG: there are " << num_threads - 1
- << " child threads already started that will now die!" << dendl;
- exit(1);
- }
-
int ret = daemon(1, 1);
if (ret) {
ret = errno;