mirror of
https://github.com/vacp2p/nim-libp2p.git
synced 2025-01-13 02:04:30 +00:00
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
|
# Starting daemon process
|
||||||
# echo "Starting ", cmd, " ", args.join(" ")
|
# 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.
|
# Waiting until daemon will not be bound to control socket.
|
||||||
while true:
|
while true:
|
||||||
if not api.process.running():
|
if not api.process.running():
|
||||||
echo api.process.outputStream.readAll()
|
|
||||||
raise newException(DaemonLocalError,
|
raise newException(DaemonLocalError,
|
||||||
"Daemon executable could not be started!")
|
"Daemon executable could not be started!")
|
||||||
let res = await socketExists(api.address)
|
let res = await socketExists(api.address)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user