mirror of
https://github.com/9001/copyparty.git
synced 2025-10-03 09:49:29 +02:00
ensure OS signals hit main-thread as intended;
use sigmasks to block SIGINT, SIGTERM, SIGUSR1 from all other threads also initiate shutdown by calling sighandler directly, in case this misses anything and that is still unreliable (discovered by `--exit=idx` being noop once in a blue moon)
This commit is contained in:
parent
2c92dab165
commit
87c60a1ec9
10 changed files with 63 additions and 43 deletions
|
@ -6,7 +6,6 @@ import platform
|
|||
import sys
|
||||
import tarfile
|
||||
import tempfile
|
||||
import threading
|
||||
import time
|
||||
import traceback
|
||||
|
||||
|
@ -80,9 +79,7 @@ def run():
|
|||
msg(" rsrc dir:", rsrc)
|
||||
msg()
|
||||
|
||||
t = threading.Thread(target=utime, args=(rsrc,), name="utime")
|
||||
t.daemon = True
|
||||
t.start()
|
||||
sys.argv.append("--sfx-tpoke=" + rsrc)
|
||||
|
||||
cm(rsrc=rsrc)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue