diff options
author | Paul Arthur <paul.arthur@flowerysong.com> | 2013-11-05 21:04:08 -0500 |
---|---|---|
committer | Paul Arthur <paul.arthur@flowerysong.com> | 2013-11-05 21:04:08 -0500 |
commit | c6680009ce6f03feafd833be1320e004be00e536 (patch) | |
tree | 79aa1f149ec3405b8bcda9a2868cb2e03c5d68fe /lib | |
parent | 786c5ca38fa79f82b331c011ecb46c32fd976719 (diff) | |
download | ampache-testing.tar.gz ampache-testing.tar.bz2 ampache-testing.zip |
Don't open stderr on WindowsHEADtestingremote_catalogmaster
According to GH #80 Windows can't handle this.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/class/stream.class.php | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/class/stream.class.php b/lib/class/stream.class.php index 66ecc42c..f2420cbe 100644 --- a/lib/class/stream.class.php +++ b/lib/class/stream.class.php @@ -135,14 +135,13 @@ class Stream { debug_event('downsample', "Downsample command: $command", 3); - $process = proc_open( - $command, - array( - 1 => array('pipe', 'w'), - 2 => array('pipe', 'w') - ), - $pipes - ); + $descriptors = array(1 => array('pipe', 'w')); + if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') { + // Windows doesn't like to provide stderr as a pipe + $descriptors[2] = array('pipe', 'w'); + } + + $process = proc_open($command, $descriptors, $pipes); return array( 'process' => $process, 'handle' => $pipes[1], |