mirror of
https://github.com/danog/process.git
synced 2024-12-03 10:07:46 +01:00
Fix PID reader
This commit is contained in:
parent
13a71c570d
commit
8aabd17000
@ -200,15 +200,15 @@ final class SocketConnector {
|
||||
}
|
||||
|
||||
public function onReadableChildPid($watcher, $socket, Handle $handle) {
|
||||
Loop::cancel($watcher);
|
||||
Loop::cancel($handle->connectTimeoutWatcher);
|
||||
|
||||
$data = \fread($socket, 5);
|
||||
|
||||
if ($data === false || $data === '') {
|
||||
return;
|
||||
}
|
||||
|
||||
Loop::cancel($watcher);
|
||||
Loop::cancel($handle->connectTimeoutWatcher);
|
||||
|
||||
if (\strlen($data) !== 5) {
|
||||
$this->failHandleStart(
|
||||
$handle, 'Failed to read PID from wrapper: Received %d of 5 expected bytes', \strlen($data)
|
||||
|
Loading…
Reference in New Issue
Block a user