mirror of
https://github.com/logos-storage/constantine.git
synced 2026-01-04 06:03:08 +00:00
don't run afoul of pipe limits
This commit is contained in:
parent
fb594c5938
commit
495d5fa9fd
@ -99,9 +99,14 @@ proc flushCommandsOutput(wq: WorkQueue) {.async.} =
|
||||
let charsWritten = stdout.writeBuffer(wq.lineBuf[0].addr, charsRead)
|
||||
doAssert charsRead == charsWritten
|
||||
|
||||
let exitCode = p.peekExitCode()
|
||||
let exitCode = await p.waitForExit()
|
||||
if exitCode != 0:
|
||||
quit "Command #" & $id & "exited with error " & $exitCode, exitCode
|
||||
quit "Command #" & $id & " exited with error " & $exitCode, exitCode
|
||||
|
||||
# p.close() is not exposed :/
|
||||
p.inputHandle.close()
|
||||
p.outputHandle.close()
|
||||
p.errorHandle.close()
|
||||
|
||||
id += 1
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user