daemonapi: direct p2pd's output to parent's streams

This commit is contained in:
Ștefan Talpalaru 2019-11-05 21:16:56 +01:00
parent 1c16eb5d69
commit f3fc763895
No known key found for this signature in database
GPG Key ID: CBF7934204F1B6F9
1 changed files with 1 additions and 2 deletions

View File

@ -745,11 +745,10 @@ proc newDaemonApi*(flags: set[P2PDaemonFlags] = {},
# Starting daemon process
# echo "Starting ", cmd, " ", args.join(" ")
api.process = startProcess(cmd, "", args, env, {poStdErrToStdOut})
api.process = startProcess(cmd, "", args, env, {poParentStreams})
# Waiting until daemon will not be bound to control socket.
while true:
if not api.process.running():
echo api.process.outputStream.readAll()
raise newException(DaemonLocalError,
"Daemon executable could not be started!")
let res = await socketExists(api.address)