Skip to content

Commit

Permalink
fork/exec -> myth_system in mythmusic
Browse files Browse the repository at this point in the history
  • Loading branch information
Beirdo committed Dec 3, 2010
1 parent 42f8aef commit fc81738
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions mythplugins/mythmusic/mythmusic/cdrip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ using namespace std;
#include <mythuibutton.h>
#include <mythuiprogressbar.h>
#include <mythuibuttonlist.h>
#include <mythsystem.h>

// MythMusic includes
#include "cdrip.h"
Expand Down Expand Up @@ -322,22 +323,7 @@ void CDRipperThread::run(void)
QString PostRipCDScript = gCoreContext->GetSetting("PostCDRipScript");

if (!PostRipCDScript.isEmpty())
{
VERBOSE(VB_IMPORTANT,
QString("PostCDRipScript: %1").arg(PostRipCDScript));
pid_t child = fork();
if (child < 0)
{
perror("fork");
}
else if (child == 0)
{
QByteArray script = PostRipCDScript.toAscii();
execl("/bin/sh", "sh", "-c", script.constData(), NULL);
perror("exec");
_exit(1);
}
}
myth_system(PostRipCDScript);

QApplication::postEvent(
m_parent, new RipStatusEvent(RipStatusEvent::kFinishedEvent, ""));
Expand Down

0 comments on commit fc81738

Please sign in to comment.