mirror of
https://github.com/clearml/clearml
synced 2025-02-12 07:35:08 +00:00
Revert fork patching as signal is not enough and is not called from forked processes
This commit is contained in:
parent
5eb4ae6600
commit
3f6fb5379a
@ -69,17 +69,17 @@ class PatchOsFork(object):
|
|||||||
# Hack: now make sure we setup the reporter thread
|
# Hack: now make sure we setup the reporter thread
|
||||||
task._setup_reporter()
|
task._setup_reporter()
|
||||||
|
|
||||||
# TODO: Check if the signal handler method is enough, for the time being, disable the _exit hook
|
# TODO: Check if the signal handler method is enough, for the time being, we have both
|
||||||
# # if we got here patch the os._exit of our instance to call us
|
# # if we got here patch the os._exit of our instance to call us
|
||||||
# def _at_exit_callback(*args, **kwargs):
|
def _at_exit_callback(*args, **kwargs):
|
||||||
# # call at exit manually
|
# call at exit manually
|
||||||
# # noinspection PyProtectedMember
|
# noinspection PyProtectedMember
|
||||||
# task._at_exit()
|
task._at_exit()
|
||||||
# # noinspection PyProtectedMember
|
# noinspection PyProtectedMember
|
||||||
# return os._org_exit(*args, **kwargs)
|
return os._org_exit(*args, **kwargs)
|
||||||
#
|
|
||||||
# if not hasattr(os, '_org_exit'):
|
if not hasattr(os, '_org_exit'):
|
||||||
# os._org_exit = os._exit
|
os._org_exit = os._exit
|
||||||
# os._exit = _at_exit_callback
|
os._exit = _at_exit_callback
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
Loading…
Reference in New Issue
Block a user