diff options
author | Sage Weil <sage.weil@dreamhost.com> | 2012-05-03 18:50:42 -0700 |
---|---|---|
committer | Greg Farnum <gregory.farnum@dreamhost.com> | 2012-05-03 20:00:36 -0700 |
commit | e50932c2043bad110d6f00b416d1d960333e9283 (patch) | |
tree | 7461c3aabbe9a307e6c420cc6f453272f38c207d | |
parent | 27d98d24194545a485aff1e94592c1bd45f6c2a2 (diff) | |
download | ceph-e50932c2043bad110d6f00b416d1d960333e9283.tar.gz |
global_init: do not count threads before daemonize()
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>
-rw-r--r-- | src/global/global_init.cc | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/global/global_init.cc b/src/global/global_init.cc index a977fbe2bc1..17f886cd6e9 100644 --- a/src/global/global_init.cc +++ b/src/global/global_init.cc @@ -144,13 +144,6 @@ void global_init_daemonize(CephContext *cct, int flags) // 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; |