Ejemplo n.º 1
0
 protected function innerClose()
 {
     (new \Yasca\Core\IteratorBuilder())->from($this->pipes)->select(Operators::paramLimit('\\fclose', 1))->where(Operators::curry([Operators::_class, 'equals'], false))->toFunctionPipe()->pipe([Iterators::_class, 'count'])->pipe([Operators::_class, 'match'], [Operators::curry([Operators::_class, 'equals'], 0), Operators::identity(null)], [Operators::identity(true), static function ($failureCount) {
         throw new \Exception("Unable to close {$failuteCount} process pipes");
     }]);
     if (\is_resource($this->process) === true) {
         \proc_close($this->process);
     }
 }