Browse Source

cli: "daemon -d": init rpc credentials before os.fork()

follow-up 8b195ee77a
master
SomberNight 2 years ago
parent
commit
20f4d44f09
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
  1. 3
      run_electrum

3
run_electrum

@ -407,6 +407,9 @@ def main():
print_stderr("Daemon already running (lockfile detected).")
print_stderr("Run 'electrum stop' to stop the daemon.")
sys.exit(1)
# Initialise rpc credentials to random if not set yet. This would normally be done
# later anyway, but we need to avoid the two sides of the fork setting conflicting random creds.
daemon.get_rpc_credentials(config) # inits creds as side-effect
# fork before creating the asyncio event loop
try:
pid = os.fork()

Loading…
Cancel
Save