fix(rpc): Shuts down surfnet on exit rpc call#611
Open
0xzrf wants to merge 2 commits intosolana-foundation:mainfrom
Open
fix(rpc): Shuts down surfnet on exit rpc call#6110xzrf wants to merge 2 commits intosolana-foundation:mainfrom
0xzrf wants to merge 2 commits intosolana-foundation:mainfrom
Conversation
Collaborator
|
I vibe coded #612 as an alternative to this, curious to get your thoughts. AFAIK the unsafe rust here is fine, but now an exit RPC call shuts down whatever the process is. This makes sense for surfpool as a CLI, but what about surfpool as an SDK? If someone is using surfpool as an SDK in a greater tool/program, and they send the exit signal, they probably aren't wanting their whole program to shut down, just the surfnet component. #612 will limit to just killing the surfnet + CLI |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summery
Shuts down the surfnet when calling the admin
exitrpc methodChanges
libccratelibccrate to callSIGTERMon surfnet program (Related: fix(surfnet): terminates the cli program on sigterm #589)Notes
I do have concern about using an unsafe function like
libc::raise, but theexitrpc method has to shut down the surfnet, and that felt like the most convenient way to do it. Happy to make changes if suggestedCloses #609