Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix atexit not working on SIGTERM #1882

Merged
merged 3 commits into from
Jan 30, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Reduce global variable
  • Loading branch information
blurHY committed Jan 30, 2019
commit 18c75443df4454bafc2205ebe697f603946bed63
4 changes: 2 additions & 2 deletions zeronet.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ def main():

main = None
try:
from signal import signal, SIGTERM
import signal

signal(SIGTERM, lambda signum, stack_frame: sys.exit(0))
signal.signal(signal.SIGTERM, lambda signum, stack_frame: sys.exit(0))

app_dir = os.path.dirname(os.path.abspath(__file__))
os.chdir(app_dir) # Change working dir to zeronet.py dir
Expand Down