Skip to content

Commit 81f7e17

Browse files
committed
Use realpath to avoid symlinks causing reloads
1 parent 69df370 commit 81f7e17

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/GearmanManager.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,11 @@ protected function getopt($config = array()) {
545545
if (!file_exists($dir)) {
546546
$this->show_help("Worker dir ".$dir." not found");
547547
}
548+
// resolve each worker directory to its real
549+
// absolute path to be work with common deployment
550+
// techniques that swap out a symlink and restart
551+
// services.
552+
$dir = realpath($dir);
548553
}
549554
unset($dir);
550555

0 commit comments

Comments
 (0)