Browse Source

CLI/RPC: better error msg when running daemon on Windows

`-d` is not supported, due to missing os.fork

related: https://github.com/spesmilo/electrum/issues/5511
master
SomberNight 3 years ago
parent
commit
68eaa680f8
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
  1. 8
      run_electrum

8
run_electrum

@ -419,7 +419,13 @@ def main():
print_stderr("Run 'electrum stop' to stop the daemon.")
sys.exit(1)
# fork before creating the asyncio event loop
pid = os.fork()
try:
pid = os.fork()
except AttributeError as e:
print_stderr(f"Error: {e!r}")
print_stderr("Running daemon in detached mode (-d) is not supported on this platform.")
print_stderr("Try running the daemon in the foreground (without -d).")
sys.exit(1)
if pid:
print_stderr("starting daemon (PID %d)" % pid)
sys.exit(0)

Loading…
Cancel
Save