diff options
| author | Antoine Pitrou <pitrou@free.fr> | 2017-05-27 17:50:54 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-05-27 17:50:54 +0200 |
| commit | 346cbd351ee0dd3ab9cb9f0e4cb625556707877e (patch) | |
| tree | 8590c5fc85acf57750ecb8d07a407a3dbe233f85 /Modules/signalmodule.c | |
| parent | f931fd1c2ad969db72460d3ab41e3d1a4a62c371 (diff) | |
| download | cpython-git-346cbd351ee0dd3ab9cb9f0e4cb625556707877e.tar.gz | |
bpo-16500: Allow registering at-fork handlers (#1715)
* bpo-16500: Allow registering at-fork handlers
* Address Serhiy's comments
* Add doc for new C API
* Add doc for new Python-facing function
* Add NEWS entry + doc nit
Diffstat (limited to 'Modules/signalmodule.c')
| -rw-r--r-- | Modules/signalmodule.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c index 108832b45c..75abc98bc4 100644 --- a/Modules/signalmodule.c +++ b/Modules/signalmodule.c @@ -1618,21 +1618,15 @@ _clear_pending_signals(void) } void -PyOS_AfterFork(void) +_PySignal_AfterFork(void) { /* Clear the signal flags after forking so that they aren't handled * in both processes if they came in just before the fork() but before * the interpreter had an opportunity to call the handlers. issue9535. */ _clear_pending_signals(); #ifdef WITH_THREAD - /* PyThread_ReInitTLS() must be called early, to make sure that the TLS API - * can be called safely. */ - PyThread_ReInitTLS(); - _PyGILState_Reinit(); - PyEval_ReInitThreads(); main_thread = PyThread_get_thread_ident(); main_pid = getpid(); - _PyImport_ReInitLock(); #endif } |
