This commit is contained in:
2020-09-07 12:04:43 +08:00
parent a2151ae964
commit fdea92418c
2 changed files with 11 additions and 1 deletions
+10
View File
@@ -184,6 +184,7 @@ class ServerInotify extends Process
*/
public function clearWatch()
{
set_error_handler([$this, 'onErrorHandler']);
foreach ($this->watchFiles as $wd) {
try {
inotify_rm_watch($this->inotify, $wd);
@@ -195,6 +196,15 @@ class ServerInotify extends Process
}
}
/**
*
*/
protected function onErrorHandler()
{
$error = func_get_args();
print_r($error[1] . ' ' . $error[2] . ':' . $error[3]);
}
/**
* @param $dir