Fixes execProcesses wait order. Refs #379.
Closing the stream of the process might terminate it too early for waitForExit to gather any useful results.
This commit is contained in:
parent
53752ccaab
commit
0eb0a887d8
1 changed files with 1 additions and 1 deletions
|
|
@ -236,8 +236,8 @@ proc execProcesses*(cmds: openArray[string],
|
||||||
inc(i)
|
inc(i)
|
||||||
if i > high(cmds): break
|
if i > high(cmds): break
|
||||||
for j in 0..m-1:
|
for j in 0..m-1:
|
||||||
if q[j] != nil: close(q[j])
|
|
||||||
result = max(waitForExit(q[j]), result)
|
result = max(waitForExit(q[j]), result)
|
||||||
|
if q[j] != nil: close(q[j])
|
||||||
else:
|
else:
|
||||||
for i in 0..high(cmds):
|
for i in 0..high(cmds):
|
||||||
var p = startCmd(cmds[i], options=options)
|
var p = startCmd(cmds[i], options=options)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue