Skip to content

Commit

Permalink
Make sure forked process has stopped when deleting MythSystem
Browse files Browse the repository at this point in the history
This forces a termination in a forked MythSystem process when the
MythSystem object is destroyed, preventing a situation where the private
internal object tries to access resources from the no-longer-existent
parent object.

Fixes #11412
  • Loading branch information
wagnerrp committed Feb 20, 2013
1 parent dc0454f commit 9c51ad3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mythtv/libs/libmythbase/mythsystem.cpp
Expand Up @@ -159,6 +159,11 @@ MythSystem::MythSystem(const MythSystem &other) :
// QBuffers may also need freeing
MythSystem::~MythSystem(void)
{
if (GetStatus() == GENERIC_EXIT_RUNNING)
{
d->Term(true);
d->Wait();
}
d->DecrRef();
}

Expand Down

0 comments on commit 9c51ad3

Please sign in to comment.