daemonapi: direct p2pd's output to parent's streams
This commit is contained in:
parent
1c16eb5d69
commit
f3fc763895
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue