diff options
| author | bitflash <dev@bitflash.network> | 2026-08-19 09:48:07 -0300 |
|---|---|---|
| committer | bitflash <dev@bitflash.network> | 2026-08-19 09:48:07 -0300 |
| commit | d4c49085a10c0f7c3f5a1dcc72184938dca38fea (patch) | |
| tree | 03143252c9b3dd46a4fcfa01c27223b26a4e33e5 /src/rpc.cpp | |
| parent | cf155d40ddd260975240e72b5e72cd3decc30291 (diff) | |
gui: harden the restart relaunch (ultra edge cases)
Follow-up to the Restart Now button. Addresses the edge cases the review
flagged, and drops the fragile batch layer entirely:
- Windows no longer writes a .bat and shells through cmd (which re-parsed
the arguments and could leave a stray file on failure). It builds the
command line once, quoted correctly (only backslashes before a quote are
doubled, so ordinary paths are not mangled), and CreateProcess launches
the new instance directly.
- The delay moved into the new instance: a -restartwait flag makes it wait
~2.5s before it opens the network port and the block index, so the old
process is gone first. No shell delay hack. Verified: -restartwait adds
the wait (0.16s -> 2.67s).
- Linux re-execs /proc/self/exe (absolute) and only falls back to argv[0],
which may be relative or a bare PATH name that execv cannot resolve.
- This instance now exits only if the relaunch actually started; on failure
it keeps running and tells the user to restart manually, so a failed
relaunch never leaves them with no node.
GUI/process wiring only; wallet code unchanged, suites still green.
Diffstat (limited to 'src/rpc.cpp')
0 files changed, 0 insertions, 0 deletions