fix more signal handler jank

This commit is contained in:
ed 2021-07-27 22:11:33 +02:00
parent 4cc3cdc989
commit f6279b356a
2 changed files with 3 additions and 5 deletions

View file

@ -709,7 +709,7 @@ class AuthSrv(object):
u = list(sorted(getattr(v.axs, attr).keys()))
u = ", ".join("\033[35meverybody\033[0m" if x == "*" else x for x in u)
u = u if u else "\033[36m--none--\033[0m"
m += "\n {}: {}".format(txt, u)
m += "\n| {}: {}".format(txt, u)
m += "\n"
if self.warn_anonwrite and not self.args.no_voldump:

View file

@ -96,7 +96,6 @@ class SvcHub(object):
m = "{}/{} workers failed to start"
m = m.format(failed, self.broker.num_workers)
self.log("root", m, 1)
#self.signal_handler(1,1)
os._exit(1)
def cb_httpsrv_up(self):
@ -166,8 +165,8 @@ class SvcHub(object):
for sig in [signal.SIGINT, signal.SIGTERM]:
signal.signal(sig, self.signal_handler)
# windows cannot ^c stop_cond,
# macos hangs after shutdown on sigterm with while-sleep,
# windows cannot ^c stop_cond (and win10 does the macos thing but winxp is fine??)
# linux is fine with both,
# never lucky
if ANYWIN:
@ -176,10 +175,9 @@ class SvcHub(object):
thr.daemon = True
thr.start()
ival = 1 if sys.gettrace() else 9001
try:
while not self.stop_req:
time.sleep(ival)
time.sleep(1)
except:
pass