equal
deleted
inserted
replaced
770 false if it could not be started or terminated with error." |
770 false if it could not be started or terminated with error." |
771 |
771 |
772 |ok procs streams| |
772 |ok procs streams| |
773 |
773 |
774 [ |
774 [ |
775 ok := self startProcess. |
775 [ |
776 ok ifTrue:[ |
776 ok := self startProcess. |
777 self waitUntilFinished. |
777 ok ifTrue:[ |
778 ok := self finishedWithSuccess. |
778 self waitUntilFinished. |
|
779 ok := self finishedWithSuccess. |
|
780 ]. |
|
781 ] ifCurtailed:[ |
|
782 pid notNil ifTrue:[ |
|
783 self terminateGroup. |
|
784 ]. |
779 ]. |
785 ]. |
780 ] ensure:[ |
786 ] ensure:[ |
781 "/ we were interrupted - |
787 "/ we were interrupted - |
782 "/ terminate the os-command (and all of its forked commands) |
788 "/ terminate the os-command (and all of its forked commands) |
783 (streams := streamsToClose) notNil ifTrue:[ |
789 (streams := streamsToClose) notNil ifTrue:[ |
788 (procs := shufflerProcesses) notNil ifTrue:[ |
794 (procs := shufflerProcesses) notNil ifTrue:[ |
789 Logger info:'terminating shuffler processes'. |
795 Logger info:'terminating shuffler processes'. |
790 shufflerProcesses := nil. |
796 shufflerProcesses := nil. |
791 procs do:[:eachProc | eachProc terminate]. |
797 procs do:[:eachProc | eachProc terminate]. |
792 ]. |
798 ]. |
793 pid notNil ifTrue:[ |
|
794 self terminateGroup. |
|
795 ]. |
|
796 ]. |
799 ]. |
797 ^ ok. |
800 ^ ok. |
798 |
801 |
799 "Modified (comment): / 23-02-2017 / 10:54:34 / Maren" |
|
800 "Modified: / 29-10-2018 / 15:59:33 / Claus Gittinger" |
802 "Modified: / 29-10-2018 / 15:59:33 / Claus Gittinger" |
|
803 "Modified: / 31-10-2018 / 12:31:42 / Maren" |
801 ! |
804 ! |
802 |
805 |
803 startProcess |
806 startProcess |
804 "Start the command asynchronously (i.e. don't wait until is has finished). |
807 "Start the command asynchronously (i.e. don't wait until is has finished). |
805 If there are non-external streams, setup transfer (shuffler) processes |
808 If there are non-external streams, setup transfer (shuffler) processes |