OSProcess.st
changeset 23280 404e5d384583
parent 23223 ef9068ed4eae
child 23391 739e979f034d
equal deleted inserted replaced
23279:d6fe9893f0a8 23280:404e5d384583
   656                 "ignore"
   656                 "ignore"
   657             ] ensure:[
   657             ] ensure:[
   658                 shuffledStream close.
   658                 shuffledStream close.
   659             ]
   659             ]
   660         ] newProcess
   660         ] newProcess
   661             name:'OSProcess input shuffler';
   661             name:'OSProcess: input shuffler';
   662 "/                beSystemProcess;
   662 "/                beSystemProcess;
   663             resume.
   663             resume.
   664 
   664 
   665     shufflerProcesses add:shufflerProcess.
   665     shufflerProcesses add:shufflerProcess.
   666     streamsToClose add:externalStream.
   666     streamsToClose add:externalStream.
   667 
   667 
   668     ^ externalStream
   668     ^ externalStream
   669 
   669 
   670     "Modified: / 31-01-2017 / 16:50:39 / stefan"
   670     "Modified: / 31-01-2017 / 16:50:39 / stefan"
   671     "Modified (comment): / 23-02-2017 / 10:51:34 / Maren"
   671     "Modified (comment): / 23-02-2017 / 10:51:34 / Maren"
       
   672     "Modified: / 15-08-2018 / 14:47:13 / Claus Gittinger"
   672 !
   673 !
   673 
   674 
   674 setupShufflerForOutput:aStream
   675 setupShufflerForOutput:aStream
   675     "if aStream is an internal Stream, set up a pipe for the command output.
   676     "if aStream is an internal Stream, set up a pipe for the command output.
   676      Start a process that shuffles the data fron the pipe into the internal stream."
   677      Start a process that shuffles the data fron the pipe into the internal stream."
   709             ] ensure:[
   710             ] ensure:[
   710                 shuffledStream close.
   711                 shuffledStream close.
   711             ].
   712             ].
   712         ] newProcess
   713         ] newProcess
   713             priority:(Processor userSchedulingPriority "+ 1");
   714             priority:(Processor userSchedulingPriority "+ 1");
   714             name:'OSProcess output shuffler';
   715             name:'OSProcess: output shuffler';
   715 "/                beSystemProcess;
   716 "/                beSystemProcess;
   716             resume.
   717             resume.
   717 
   718 
   718     shufflerProcesses add:shufflerProcess.
   719     shufflerProcesses add:shufflerProcess.
   719     streamsToClose add:externalStream.
   720     streamsToClose add:externalStream.
   720 
   721 
   721     ^ externalStream
   722     ^ externalStream
   722 
   723 
   723     "Modified: / 31-01-2017 / 16:57:25 / stefan"
   724     "Modified: / 31-01-2017 / 16:57:25 / stefan"
       
   725     "Modified: / 15-08-2018 / 14:47:05 / Claus Gittinger"
   724 !
   726 !
   725 
   727 
   726 startCommand
   728 startCommand
   727     "the 'real' command to be executed.
   729     "the 'real' command to be executed.
   728      Redefined for remote processes (eg. to construct a remote command string).
   730      Redefined for remote processes (eg. to construct a remote command string).