STINNER Victor added the comment:

> manager._process.exitcode == -15

-15 is -signal.SIGTERM and comes from Popen.wait() of 
multiprocessing.popen_spawn_win32.

            res = _winapi.WaitForSingleObject(int(self._handle), msecs)
            if res == _winapi.WAIT_OBJECT_0:
                code = _winapi.GetExitCodeProcess(self._handle)
                if code == TERMINATE:
                    code = -signal.SIGTERM

The process exited and its exit code is 0x10000 (TERMINATE).

I understand that Popen.terminate() of multiprocessing.popen_spawn_win32 was 
called.

BaseManager.start() registers a finalizer: _finalize_manager(). This method 
sends a "shutdown" message to the process and then gives 1.0 second to the 
process to complete. If the process doesn't complete in 1 second, .terminate() 
is called.

1 second is kind of arbitrary: it depends on the system load. We should give 
more time to the manager to complete, or accept -signal.SIGTERM as a "valid" 
exit code.

I see different options:

* Shutdown the manager in test_multiprocessing and give more time to the 
manager to complete
* Make the timeout configurable
* Allow -signal.SIGTERM exit code in test_mymanager_context()

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30356>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to