Skip to content

Commit

Permalink
check pid
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Mar 22, 2018
1 parent 52795e0 commit 15bd214
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Illuminate/Console/Scheduling/CallbackEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,12 @@ public function run(Container $container)
return;
}

register_shutdown_function(function () {
$this->removeMutex();
$pid = getmypid();

register_shutdown_function(function () use ($pid) {
if ($pid === getmypid()) {
$this->removeMutex();
}
});

parent::callBeforeCallbacks($container);
Expand Down

0 comments on commit 15bd214

Please sign in to comment.