Defunct Script Process

This might be by design, and my lack of understanding is the problem. If so, please let me know. I have a few scripts that run when certain Event Handlers are met, and I just noticed that the most recent script to run is always left as a Zombie process in a defunct state. The Parent Process is (wsgi:privacyid -DFOREGROUND. I have “exit 0” at the end of all my scripts, and they exit gracefully when I manually run them, but when called by PrivacyIDEA, they are not properly terminated. Or, don’t appear to be, anyway. The scripts themselves function as expected when called, so as I said, this might not be an issue and is “by design”.

If it’s not by design, any idea what I might be doing wrong?

Thanks!

We did not design this on purpose.
Does it only occur if you have more than one script or also with only one script?

Multiple scripts are not called concurrently. All four scripts exhibit this behavior. Only the most recent script is left as a zombie, though. So, an event occurs that leaves script 1 as a zombie. Then, with a different event later, script 2 is called and that is left as a zombie, but script 1 is now no longer showing up as a zombie, only script 2. Same with script 3, and back to 1 and so on. Only the most recent script remains in the processes as a zombie.