summaryrefslogtreecommitdiffstats
path: root/lib/class
diff options
context:
space:
mode:
authorPaul Arthur <paul.arthur@flowerysong.com>2013-11-05 21:04:08 -0500
committerPaul Arthur <paul.arthur@flowerysong.com>2013-11-05 21:04:08 -0500
commitc6680009ce6f03feafd833be1320e004be00e536 (patch)
tree79aa1f149ec3405b8bcda9a2868cb2e03c5d68fe /lib/class
parent786c5ca38fa79f82b331c011ecb46c32fd976719 (diff)
downloadampache-master.tar.gz
ampache-master.tar.bz2
ampache-master.zip
Don't open stderr on WindowsHEADtestingremote_catalogmaster
According to GH #80 Windows can't handle this.
Diffstat (limited to 'lib/class')
-rw-r--r--lib/class/stream.class.php15
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],