this repo has no description
at trunk 38 lines 901 B view raw
1// Copyright (c) Facebook, Inc. and its affiliates. (http://www.facebook.com) 2#include <csignal> 3 4#include "cpython-func.h" 5 6#include "runtime.h" 7#include "under-imp-module.h" 8 9namespace py { 10 11PY_EXPORT void _PySignal_AfterFork() { 12 // TODO(T39596544): do nothing until we have a GIL. 13} 14 15PY_EXPORT int PyErr_CheckSignals() { 16 Thread* thread = Thread::current(); 17 if (thread->runtime()->handlePendingSignals(thread).isErrorException()) { 18 return -1; 19 } 20 return 0; 21} 22 23PY_EXPORT void PyErr_SetInterrupt() { 24 Thread* thread = Thread::current(); 25 thread->runtime()->setPendingSignal(thread, SIGINT); 26} 27 28PY_EXPORT void PyOS_InitInterrupts() { UNIMPLEMENTED("PyOS_InitInterrupts"); } 29 30PY_EXPORT int PyOS_InterruptOccurred(void) { 31 UNIMPLEMENTED("PyOS_InterruptOccurred"); 32} 33 34PY_EXPORT int _PyOS_InterruptOccurred(PyThreadState*) { 35 UNIMPLEMENTED("_PyOS_InterruptOccurred"); 36} 37 38} // namespace py