mirror of
https://github.com/9001/copyparty.git
synced 2025-08-18 01:22:13 -06:00
fix more signal handler jank
This commit is contained in:
parent
4cc3cdc989
commit
f6279b356a
|
@ -709,7 +709,7 @@ class AuthSrv(object):
|
||||||
u = list(sorted(getattr(v.axs, attr).keys()))
|
u = list(sorted(getattr(v.axs, attr).keys()))
|
||||||
u = ", ".join("\033[35meverybody\033[0m" if x == "*" else x for x in u)
|
u = ", ".join("\033[35meverybody\033[0m" if x == "*" else x for x in u)
|
||||||
u = u if u else "\033[36m--none--\033[0m"
|
u = u if u else "\033[36m--none--\033[0m"
|
||||||
m += "\n {}: {}".format(txt, u)
|
m += "\n| {}: {}".format(txt, u)
|
||||||
m += "\n"
|
m += "\n"
|
||||||
|
|
||||||
if self.warn_anonwrite and not self.args.no_voldump:
|
if self.warn_anonwrite and not self.args.no_voldump:
|
||||||
|
|
|
@ -96,7 +96,6 @@ class SvcHub(object):
|
||||||
m = "{}/{} workers failed to start"
|
m = "{}/{} workers failed to start"
|
||||||
m = m.format(failed, self.broker.num_workers)
|
m = m.format(failed, self.broker.num_workers)
|
||||||
self.log("root", m, 1)
|
self.log("root", m, 1)
|
||||||
#self.signal_handler(1,1)
|
|
||||||
os._exit(1)
|
os._exit(1)
|
||||||
|
|
||||||
def cb_httpsrv_up(self):
|
def cb_httpsrv_up(self):
|
||||||
|
@ -166,8 +165,8 @@ class SvcHub(object):
|
||||||
for sig in [signal.SIGINT, signal.SIGTERM]:
|
for sig in [signal.SIGINT, signal.SIGTERM]:
|
||||||
signal.signal(sig, self.signal_handler)
|
signal.signal(sig, self.signal_handler)
|
||||||
|
|
||||||
# windows cannot ^c stop_cond,
|
|
||||||
# macos hangs after shutdown on sigterm with while-sleep,
|
# 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,
|
# linux is fine with both,
|
||||||
# never lucky
|
# never lucky
|
||||||
if ANYWIN:
|
if ANYWIN:
|
||||||
|
@ -176,10 +175,9 @@ class SvcHub(object):
|
||||||
thr.daemon = True
|
thr.daemon = True
|
||||||
thr.start()
|
thr.start()
|
||||||
|
|
||||||
ival = 1 if sys.gettrace() else 9001
|
|
||||||
try:
|
try:
|
||||||
while not self.stop_req:
|
while not self.stop_req:
|
||||||
time.sleep(ival)
|
time.sleep(1)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue