diff --git a/devsupApp/src/setup.c b/devsupApp/src/setup.c index 6380f4f..72dcc6c 100644 --- a/devsupApp/src/setup.c +++ b/devsupApp/src/setup.c @@ -57,16 +57,24 @@ static pystate statenames[] = { INITST(AfterCaServerPaused), INITST(AfterDatabasePaused), INITST(AfterIocPaused), + + {(initHookState)9999, "AtIocExit"}, + {(initHookState)0, NULL} }; #undef INITST +static void pyhook(initHookState state); + static void cleanupPy(void *junk) { PyThreadState *state = PyGILState_GetThisThreadState(); PyEval_RestoreThread(state); + /* special "fake" hook for shutdown */ + pyhook((initHookState)9999); + PyField_cleanup(); /* release extra reference for hooktable */