[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #3701 [Torctl]: PyTorCtl shouldn't os.kill() itself
#3701: PyTorCtl shouldn't os.kill() itself
-----------------------+----------------------------------------------------
Reporter: mikeperry | Owner:
Type: defect | Status: new
Priority: major | Milestone:
Component: Torctl | Version:
Keywords: | Parent:
Points: | Actualpoints:
-----------------------+----------------------------------------------------
In order to ensure we died properly from uncaught exceptions in user-
written event threads, I hacked in an os.kill() into the event loop that
catches these exceptions, because sys.exit() only exits the thread, and
os._exit() doesn't call atexit handlers. os.kill() does call the atexit
handlers, but it causes the return value of the interpreter to be the
signal used. This exit value breaks out bw authority parent/child model,
which relies on exit codes to properly detect child death and respawn.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/3701>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs