Skip to content

Graceful exit support#50

Merged
xTrayambak merged 5 commits intomainfrom
graceful-exits
Apr 17, 2025
Merged

Graceful exit support#50
xTrayambak merged 5 commits intomainfrom
graceful-exits

Conversation

@xTrayambak
Copy link
Member

  • bump: stylus: master -> 0.1.3; bali: 0.6.3 -> master
  • fix: master: propagate goodbye packets when the renderer exits
  • add: html/ipc: respond to goodbye-packets
  • add: network/ipc: react to goodbye-packets
  • add: js/ipc: react to goodbye-packets

Ferus currently just leaves behind a messy trail of processes that have nothing to do and just sit around after the renderer exits due to user interaction.
This PR fixes it by making the master propagate "goodbye" packets to ALL processes it knows. Those processes start cleaning up and stop their event loop as
soon as they get the packet.

The JavaScript runtime's cleanup sequence needs a bit of work because it currently just segfaults when it has to exit. Possibly something in Bali being silly?

The HTML process now correctly shuts down when it receives a `feGoodbye`
packet.
The network process now responds to `feGoodbye` packets. The cleanup
sequence is as follows:
- Shut down all open WebSocket connections
- Shut down the main cURL handle, halt all in-flight connections and deallocate all memory occupied by
  it.
The JavaScript process now reacts to `feGoodbye` packets. The cleanup
sequence needs some work. (It currently segfaults as soon as it's about
to exit, most likely due to some problem in Bali!)
@xTrayambak xTrayambak merged commit 4a3f7c7 into main Apr 17, 2025
0 of 2 checks passed
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.

1 participant