summaryrefslogtreecommitdiffstats
path: root/apps/files_external/3rdparty/icewind/smb/src/RawConnection.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/3rdparty/icewind/smb/src/RawConnection.php')
-rw-r--r--apps/files_external/3rdparty/icewind/smb/src/RawConnection.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/files_external/3rdparty/icewind/smb/src/RawConnection.php b/apps/files_external/3rdparty/icewind/smb/src/RawConnection.php
index 926ce3714cf..15478511a72 100644
--- a/apps/files_external/3rdparty/icewind/smb/src/RawConnection.php
+++ b/apps/files_external/3rdparty/icewind/smb/src/RawConnection.php
@@ -149,6 +149,18 @@ class RawConnection {
return;
}
if ($terminate) {
+ // if for case that posix_ functions are not available
+ if (function_exists('posix_kill')) {
+ $status = proc_get_status($this->process);
+ $ppid = $status['pid'];
+ $pids = preg_split('/\s+/', `ps -o pid --no-heading --ppid $ppid`);
+ foreach($pids as $pid) {
+ if(is_numeric($pid)) {
+ //9 is the SIGKILL signal
+ posix_kill($pid, 9);
+ }
+ }
+ }
proc_terminate($this->process);
}
proc_close($this->process);