try to fix "too many open files" error
This commit is contained in:
parent
1719e07c97
commit
149ac0df06
|
@ -34,8 +34,10 @@ proc asyncExecCmd*(command: string): Future[string] =
|
|||
(result, exitCode) = execCmdEx(command)
|
||||
if exitCode != 0:
|
||||
failureEvent.trigger()
|
||||
successEvent.unregister()
|
||||
else:
|
||||
successEvent.trigger()
|
||||
failureEvent.unregister()
|
||||
let flowVar = spawn execCmdBackground(successEvent, failureEvent, command)
|
||||
proc successCallback(fd: AsyncFD): bool =
|
||||
future.complete(^flowVar)
|
||||
|
|
Loading…
Reference in New Issue