mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-04 01:34:07 +02:00
using exec to start smbclient, replaces the need to kill forked procs
This commit is contained in:
parent
26b7b87803
commit
e30d3afd08
2 changed files with 4 additions and 13 deletions
|
|
@ -173,18 +173,6 @@ 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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue