Skip to content

Commit

Permalink
[Process] Warn user with a useful message when tmpfile() failed
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed Feb 14, 2013
1 parent 0209eb6 commit 5e8d844
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Symfony/Component/Process/Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,9 @@ public function start($callback = null)
$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,
);
Expand Down

0 comments on commit 5e8d844

Please sign in to comment.