PipeStream.st
changeset 22696 7b933d672ea3
parent 22507 eb40c1d02504
child 22794 eda5d0a964e5
equal deleted inserted replaced
22695:a817e109e67d 22696:7b933d672ea3
       
     1 "{ Encoding: utf8 }"
       
     2 
     1 "
     3 "
     2  COPYRIGHT (c) 1989 by Claus Gittinger
     4  COPYRIGHT (c) 1989 by Claus Gittinger
     3 	      All Rights Reserved
     5 	      All Rights Reserved
     4 
     6 
     5  This software is furnished under a license and may be used
     7  This software is furnished under a license and may be used
   220 
   222 
   221     "
   223     "
   222 	|p|
   224 	|p|
   223 
   225 
   224 	p := PipeStream bidirectionalFor:'cat -u'.
   226 	p := PipeStream bidirectionalFor:'cat -u'.
   225 	p nextPutAll:'Wer ist der Bürgermeister von Wesel'; cr.
   227 	p nextPutAll:'Wer ist der Bürgermeister von Wesel'; cr.
   226 	Transcript showCR:p nextLine.
   228 	Transcript showCR:p nextLine.
   227 	p close
   229 	p close
   228     "
   230     "
   229 
   231 
   230     "
   232     "
   535 close
   537 close
   536     "low level close
   538     "low level close
   537      This waits for the command to finish.
   539      This waits for the command to finish.
   538      Use abortAndClose for a fast (nonBlocking) close."
   540      Use abortAndClose for a fast (nonBlocking) close."
   539 
   541 
   540     handle notNil ifTrue:[
   542     self isOpen ifTrue:[
   541         super close.
   543         super close.
   542         "/ wait for the pipe-command to terminate.
   544         "/ wait for the pipe-command to terminate.
   543         self waitForPipeCommandWithTimeout:nil.
   545         self waitForPipeCommandWithTimeout:nil.
   544     ].
   546     ].
   545 
   547 
   546     "Modified: / 12.9.1998 / 16:51:04 / cg"
   548     "Modified: / 12-09-1998 / 16:51:04 / cg"
       
   549     "Modified: / 23-04-2018 / 18:25:04 / stefan"
   547 !
   550 !
   548 
   551 
   549 shutDown
   552 shutDown
   550     <resource: #obsolete>
   553     <resource: #obsolete>
   551     "this is a historic leftover kept for backward compatibility.
   554     "this is a historic leftover kept for backward compatibility.