File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
src/core/IronPython.Modules Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -434,13 +434,19 @@ public PythonSignalState(PythonContext pc) {
434434 : throw new NotSupportedException ( "Unsupported platform for signal module" ) ;
435435
436436 PySignalToPyHandler = new Dictionary < int , object > ( sigs . Length ) ;
437+ object sig_dfl = ScriptingRuntimeHelpers . Int32ToObject ( SIG_DFL ) ;
438+ object sig_ign = ScriptingRuntimeHelpers . Int32ToObject ( SIG_IGN ) ;
437439 foreach ( int sig in sigs ) {
438- PySignalToPyHandler [ sig ] = SIG_DFL ;
440+ PySignalToPyHandler [ sig ] = sig_dfl ;
439441 }
440442 PySignalToPyHandler [ SIGINT ] = default_int_handler ;
441443 if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Linux ) || RuntimeInformation . IsOSPlatform ( OSPlatform . OSX ) ) {
442- PySignalToPyHandler [ SIGPIPE ] = SIG_IGN ;
443- PySignalToPyHandler [ SIGXFSZ ] = SIG_IGN ;
444+ PySignalToPyHandler [ SIGPIPE ] = sig_ign ;
445+ PySignalToPyHandler [ SIGXFSZ ] = sig_ign ;
446+ }
447+ if ( RuntimeInformation . IsOSPlatform ( OSPlatform . OSX ) ) {
448+ PySignalToPyHandler . Remove ( SIGKILL ) ;
449+ PySignalToPyHandler . Remove ( SIGSTOP ) ;
444450 }
445451 }
446452 }
You can’t perform that action at this time.
0 commit comments