[Process] Warn user with a useful message when tmpfile() failed

This commit is contained in:
Jordi Boggiano 2013-02-14 12:11:15 +01:00
parent 0209eb6c47
commit 5e8d844678

View File

@ -213,6 +213,9 @@ class Process
$this->fileHandles = array(
self::STDOUT => tmpfile(),
);
if (false === $this->fileHandles[self::STDOUT]) {
throw new RuntimeException('A temporary file could not be opened to write the process output to, verify that your TEMP environment variable is writable');
}
$this->readBytes = array(
self::STDOUT => 0,
);