From c4a1c7deeacbe25ea1edafdda9b770aa3faeaeee Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Mon, 6 May 2019 11:36:48 -0700 Subject: [PATCH] delay registering second cleanupPy() until just _before_ exitDatabase, to ensure that cleanup happens _after_ devSup detach(). Still allows devSup build() the opportunity to add epicsAtExit() which happen between cac cleanup and our cleanup. --- pyIocApp/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyIocApp/setup.c b/pyIocApp/setup.c index a15fcb5..61c3861 100644 --- a/pyIocApp/setup.c +++ b/pyIocApp/setup.c @@ -123,7 +123,7 @@ static void cleanupPrep(initHookState state) /* register a second time to better our chances of running * first on exit. eg. before cacExitHandler() */ - if(state==initHookAfterIocRunning) + if(state==initHookAfterInitDevSup) epicsAtExit(&cleanupPy, NULL); }