Skip to content
Snippets Groups Projects
Commit 4cf08bad authored by Johannes Elmsheuser's avatar Johannes Elmsheuser
Browse files

Merge branch 'psc_pyfork' into 'master'

TrigPSC: check if Python interpreter is used before calling BeforeFork

Closes ATR-23556

See merge request atlas/athena!44106
parents d0de15bc b4ab001a
No related branches found
No related tags found
No related merge requests found
...@@ -506,10 +506,12 @@ bool psc::Psc::prepareForRun (const ptree& args) ...@@ -506,10 +506,12 @@ bool psc::Psc::prepareForRun (const ptree& args)
return false; return false;
} }
// After prepareForRun the HLTMPPU will fork the workers. Tell the Python if ( Py_IsInitialized() ) {
// interpreter this is happening to avoid deadlocks (ATR-23428). // After prepareForRun the HLTMPPU will fork the workers. Tell the Python
ERS_DEBUG(1, "Pre-fork initialization of Python interpreter"); // interpreter this is happening to avoid deadlocks (ATR-23428).
PyOS_BeforeFork(); ERS_DEBUG(1, "Pre-fork initialization of Python interpreter");
PyOS_BeforeFork();
}
return true; return true;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment