merged branch Seldaek/proctemp (PR #7066)

This PR was merged into the 2.1 branch.

Commits
-------

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

Discussion
----------

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

Simple warning so users know what's going on instead of getting a proc_open error, see composer/composer#1581.

Can't get the PR template since ~~symfony.com~~ my dns resolver is dead :)
This commit is contained in:
Fabien Potencier 2013-02-14 12:20:33 +01:00
commit 7d143aac42

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,
);