1 # Eloipool - Python Bitcoin pool server
2 # Copyright (C) 2011-2012 Luke Dashjr <luke-jr+eloipool@utopios.org>
4 # This program is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU Affero General Public License as
6 # published by the Free Software Foundation, either version 3 of the
7 # License, or (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU Affero General Public License for more details.
14 # You should have received a copy of the GNU Affero General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 os.kill(os.getpid(), signal.SIGTERM)
22 import code, sys, threading
26 namespace = sys.exc_info()[2].tb_frame.f_back.f_back.f_globals
28 namespace.setdefault('exit', exit)
32 code.interact(local=namespace, banner='')
33 print("Not exiting implicitly. Use exit() if you really want to.")
35 for thread in threading.enumerate():
40 print("(%d threads: %d primary, %d daemon)" % (dt + ndt, ndt, dt))
41 threading.Timer(0, CLI).start()