public function onWrite($process) { if ($this->attrs->stdin_done && $this->proc->writeState === false) { $this->proc->closeWrite(); } }