Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CHIA-1645: Some daemon start cleanup #18809

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

emlowe
Copy link
Contributor

@emlowe emlowe commented Nov 1, 2024

Change the daemon startup procedure:

  • During start, the daemon no longer outputs some JSON on stdout. This was previously read by the GUI (although it's not known how long it was used) - but hasn't been read since earlier this year (see Remove unused code that attempts to read the output of the daemon chia-blockchain-gui#2526) when the GUI startup was changed to use chia start daemon
  • The daemon is launched with setting stdout,stderr,stdin to DEVNULL and with start_new_session
  • Code was added to stop trying to read the daemon stdout as a mechanism to wait for the daemon to be ready and code added to retry to connect to the socket

This seems to work well so far in my testing and I believe this will fix both #18677 and #16396

I tested launching the daemon in a variety of ways including

  • chia start daemon
  • chia run_daemon
  • chia_daemon

So far testing was limited to macOS and Linux, Windows needs some additional testing.

@emlowe emlowe changed the title Some daemon start cleanup CHIA-1645: Some daemon start cleanup Nov 1, 2024
@emlowe emlowe added the Fixed Required label for PR that categorizes merge commit message as "Fixed" for changelog label Nov 4, 2024
Copy link
Contributor

github-actions bot commented Nov 5, 2024

File Coverage Missing Lines
chia/cmds/start_funcs.py 0.0% lines 53-54
chia/daemon/client.py 86.7% lines 57-58
Total Missing Coverage
18 lines 4 lines 77%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
coverage-diff Fixed Required label for PR that categorizes merge commit message as "Fixed" for changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant