Re: Terminating provider process

Jan Safranek <[email protected]> Mon, 20 May 2013 10:16:40 +0200
Newsgroups gmane.network.open-pegasus.general
Message-ID <[email protected]>
On 05/17/2013 05:54 PM, Kirk Augustin wrote:
> Not sure I am following exactly, but isn't the problem more to do with
> the time delay in Python unloading?
> I don't think the ProviderAgent closing down can be hastened if Python
> itself is slow to unload.
> Nor do I think there should there be a crash because the provider is
> called again before the ProviderAgent process has shut down.
> Which is why I wonder if both problems are really coming from Python,
> and not the ProviderAgent?
> Is it possible to watch the Python process to see if it is what is
> causing the delay in the ProviderAgent closing?

Python terminates pretty quickly, that's fine. Problem is it cannot be
started again *in the same process*, it uses some global variables etc.
Therefore the only sane way is to exit the ProviderAgent process
immediately when the provider is unloaded.

Of course, fixing Python would be the best solution, but it seems it's
like this on purpose and changing this behavior would need really
significant changes in its design.

Jan