mirror of
https://github.com/danog/process.git
synced 2025-01-22 13:51:43 +01:00
Use close() on object instead of fclose() on resource
This commit is contained in:
parent
5aa6040fcf
commit
c07c27f882
@ -94,16 +94,16 @@ class Process {
|
||||
Loop::cancel($this->watcher);
|
||||
}
|
||||
|
||||
if ($this->stdin && \is_resource($resource = $this->stdin->getResource())) {
|
||||
\fclose($resource);
|
||||
if ($this->stdin) {
|
||||
$this->stdin->close();
|
||||
}
|
||||
|
||||
if ($this->stdout && \is_resource($resource = $this->stdout->getResource())) {
|
||||
\fclose($resource);
|
||||
if ($this->stdout) {
|
||||
$this->stdout->close();
|
||||
}
|
||||
|
||||
if ($this->stderr && \is_resource($resource = $this->stderr->getResource())) {
|
||||
\fclose($resource);
|
||||
if ($this->stderr) {
|
||||
$this->stderr->close();
|
||||
}
|
||||
|
||||
if (\is_resource($this->process)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user