public function createStream() { if ('Linux' !== PHP_OS) { return parent::createStream(); } $this->fifoPath = tempnam(sys_get_temp_dir(), 'react-'); unlink($this->fifoPath); // Use a FIFO on linux to get around lack of support for disk-based file // descriptors when using the EPOLL back-end. posix_mkfifo($this->fifoPath, 0600); $stream = fopen($this->fifoPath, 'r+'); return $stream; }