OSProcess.st
branchjv
changeset 21387 e3865533e6a6
parent 21252 1b7c2d5523d5
parent 21332 18ca24f32565
--- a/OSProcess.st	Sun Jan 29 11:04:01 2017 +0000
+++ b/OSProcess.st	Wed Feb 01 11:28:48 2017 +0000
@@ -329,22 +329,22 @@
     "/ inStream to the pipe (which is connected to the commands input)
     shufflerProcess := [
             [
-                WriteError handle:[:ex |"ignored" ] do:[
-                    lineWise ifTrue:[
-                        "shuffle until end-of-input"
-                        [aStream atEnd] whileFalse:[
-                            |data|
+                lineWise ifTrue:[
+                    "shuffle until end-of-input"
+                    [aStream atEnd] whileFalse:[
+                        |data|
 
-                            data := aStream nextLine.
-                            data notNil ifTrue:[
-                                shuffledStream nextPutLine:data.
-                                shuffledStream flush.
-                            ].
+                        data := aStream nextLine.
+                        data notNil ifTrue:[
+                            shuffledStream nextPutLine:data.
+                            shuffledStream flush.
                         ].
-                    ] ifFalse:[
-                        aStream copyToEndInto:shuffledStream.
                     ].
+                ] ifFalse:[
+                    aStream copyToEndInto:shuffledStream.
                 ].
+            ] on:WriteError do:[:ex|
+                "ignore"
             ] ensure:[
                 shuffledStream close.
             ]
@@ -357,6 +357,8 @@
     streamsToClose add:externalStream.
 
     ^ externalStream
+
+    "Modified: / 31-01-2017 / 16:50:39 / stefan"
 !
 
 setupShufflerForOutput:aStream
@@ -377,24 +379,24 @@
     ].
 
     shufflerProcess := [
-            WriteError handle:[:ex |"ignored" ] do:[
-                [
-                    "shuffle until the pipe closes"
-                    lineWise ifTrue:[
-                        [shuffledStream atEnd] whileFalse:[
-                            |data|
+            [
+                "shuffle until the pipe closes"
+                lineWise ifTrue:[
+                    [shuffledStream atEnd] whileFalse:[
+                        |data|
 
-                            data := shuffledStream nextLine.
-                            data notNil ifTrue:[
-                                aStream nextPutLine:data
-                            ].
+                        data := shuffledStream nextLine.
+                        data notNil ifTrue:[
+                            aStream nextPutLine:data
                         ].
-                    ] ifFalse:[
-                        shuffledStream copyToEndInto:aStream.
                     ].
-                ] ensure:[
-                    shuffledStream close.
+                ] ifFalse:[
+                    shuffledStream copyToEndInto:aStream.
                 ].
+            ] on:WriteError do:[:ex |
+                "ignore" 
+            ] ensure:[
+                shuffledStream close.
             ].
         ] newProcess
             priority:(Processor userSchedulingPriority "+ 1");
@@ -406,6 +408,8 @@
     streamsToClose add:externalStream.
 
     ^ externalStream
+
+    "Modified: / 31-01-2017 / 16:57:25 / stefan"
 ! !
 
 !OSProcess methodsFor:'queries'!