Skip to content

Commit

Permalink
pcntl_exec replaced by exec when shell argument is false
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiopvilar committed Jul 29, 2013
1 parent a4f1cf0 commit 319a56a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion KindlePeriodical.php
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,12 @@ private function createMOBI()
{

$generate = 'cd ' . $this->directory . '; kindlegen -c2 content.opf -o ' . $this->filename . '.mobi';
$output = shell_exec($generate . " 2>&1");

if($this->shell == true){
$output = shell_exec($generate . " 2>&1");
}else{
exec($generate, $output);
}

if ($this->debug == TRUE):
echo $generate . "<br /><br />";
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ With this, you can now generate your .mobi file with KindlePeriodical:
"outputFolder" => "out",
// Optional arguments:
"shell" => false, // KindlePeriodical will use pcntl_exec
"shell" => false, // KindlePeriodical will use exec instead of shell_exec
"debug" => true

));
Expand Down

0 comments on commit 319a56a

Please sign in to comment.