|
@@ -38,9 +38,7 @@ class LockWaitCommand extends ContainerAwareCommand
|
|
$no_exclusive = $input->getOption('no-exclusive');
|
|
$no_exclusive = $input->getOption('no-exclusive');
|
|
if ($filename && $command) {
|
|
if ($filename && $command) {
|
|
$handle = $this->fopen($filename, $dir);
|
|
$handle = $this->fopen($filename, $dir);
|
|
- if ($this->flock($handle, $command, $timeout, $no_exclusive)) {
|
|
|
|
- $output->writeln('<info>OK</info>');
|
|
|
|
- }
|
|
|
|
|
|
+ $this->flock($handle, $command, $timeout, $no_exclusive);
|
|
} else {
|
|
} else {
|
|
$output->writeln('<error>Enter a valid filename and command</error>');
|
|
$output->writeln('<error>Enter a valid filename and command</error>');
|
|
}
|
|
}
|
|
@@ -85,6 +83,7 @@ class LockWaitCommand extends ContainerAwareCommand
|
|
exit(1);
|
|
exit(1);
|
|
});
|
|
});
|
|
pcntl_alarm($timeout);
|
|
pcntl_alarm($timeout);
|
|
|
|
+
|
|
$operation = LOCK_EX;
|
|
$operation = LOCK_EX;
|
|
if ($no_exclusive) {
|
|
if ($no_exclusive) {
|
|
$operation = LOCK_SH;
|
|
$operation = LOCK_SH;
|