File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -209,12 +209,13 @@ extension Platform {
209209 if pgid != - 1 {
210210 tcsetpgrp ( STDOUT_FILENO, process. processIdentifier)
211211 }
212- process. waitUntilExit ( )
213212
214213 defer { if pgid != - 1 {
215214 tcsetpgrp ( STDOUT_FILENO, pgid)
216215 } }
217216
217+ process. waitUntilExit ( )
218+
218219 guard process. terminationStatus == 0 else {
219220 throw RunProgramError ( exitCode: process. terminationStatus, program: args. first!)
220221 }
@@ -254,14 +255,14 @@ extension Platform {
254255 if pgid != - 1 {
255256 tcsetpgrp ( STDOUT_FILENO, process. processIdentifier)
256257 }
257- let outData = try outPipe. fileHandleForReading. readToEnd ( )
258-
259- process. waitUntilExit ( )
260-
261258 defer { if pgid != - 1 {
262259 tcsetpgrp ( STDOUT_FILENO, pgid)
263260 } }
264261
262+ let outData = try outPipe. fileHandleForReading. readToEnd ( )
263+
264+ process. waitUntilExit ( )
265+
265266 guard process. terminationStatus == 0 else {
266267 throw RunProgramError ( exitCode: process. terminationStatus, program: args. first!)
267268 }
You can’t perform that action at this time.
0 commit comments