Skip to content

fix(rpc): Shuts down surfnet on exit rpc call#611

Open
0xzrf wants to merge 2 commits intosolana-foundation:mainfrom
0xzrf:fix_exit_bug
Open

fix(rpc): Shuts down surfnet on exit rpc call#611
0xzrf wants to merge 2 commits intosolana-foundation:mainfrom
0xzrf:fix_exit_bug

Conversation

@0xzrf
Copy link
Copy Markdown
Contributor

@0xzrf 0xzrf commented Apr 3, 2026

Summery

Shuts down the surfnet when calling the admin exit rpc method

Changes

Notes

I do have concern about using an unsafe function like libc::raise, but the exit rpc method has to shut down the surfnet, and that felt like the most convenient way to do it. Happy to make changes if suggested

Closes #609

@0xzrf 0xzrf changed the title fix(rpc): Shuts down surnet on exit rpc call fix(rpc): Shuts down surfnet on exit rpc call Apr 3, 2026
@MicaiahReid
Copy link
Copy Markdown
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

exit admin RPC does no exit surfnet

2 participants