From 11c0fb580d19b2c7c170121d519ca3ee4fc710d6 Mon Sep 17 00:00:00 2001 From: Julien Moulin Date: Sat, 2 Mar 2013 18:41:21 +0100 Subject: [PATCH] #7106 - fix for ZTS builds --- src/Symfony/Component/Process/Process.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Process/Process.php b/src/Symfony/Component/Process/Process.php index 668e55b707..f8a3293b12 100644 --- a/src/Symfony/Component/Process/Process.php +++ b/src/Symfony/Component/Process/Process.php @@ -128,8 +128,13 @@ class Process $this->commandline = $commandline; $this->cwd = $cwd; + // on windows, if the cwd changed via chdir(), proc_open defaults to the dir where php was started - if (null === $this->cwd && defined('PHP_WINDOWS_VERSION_BUILD')) { + // on gnu/linux, PHP builds with --enable-maintainer-zts are also affected + // @see : https://bugs.php.net/bug.php?id=51800 + // @see : https://bugs.php.net/bug.php?id=50524 + + if (null === $this->cwd && (defined('ZEND_THREAD_SAFE') || defined('PHP_WINDOWS_VERSION_BUILD'))) { $this->cwd = getcwd(); } if (null !== $env) {