pluto icon indicating copy to clipboard operation
pluto copied to clipboard

Enhance the exit mechanism of the pluto cli

Open jianzs opened this issue 1 year ago • 0 comments

Describe the feature

Currently, the pluto cli command is designed to require two presses of Ctrl-C to exit, as a measure to prevent accidental exits. However, the intended functionality is to pass the SIGINT signal to the simulator in order to initiate a graceful cleanup of resources. The first press of Ctrl-C is meant to be ignored by the cli and subsequently passed to the simulator. Upon receiving the signal, the simulator should perform a graceful cleanup. The second press of Ctrl-C should then be caught by the cli to exit the command line interface.

So, the current behavior is such that after the first press of Ctrl-C, the simulator exits. This is not the intuitive behavior that we expect.

What we expect are two possible behaviors:

  • Upon pressing Ctrl-C once, the simulator and cli should gracefully exit.
  • Alternatively, two presses of Ctrl-C should be required for the simulator to exit, ensuring that the application remains operational after the first press.

Use Case

pluto run

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • [ ] I may be able to implement this feature request
  • [ ] This feature might incur a breaking change

jianzs avatar Jun 13 '24 09:06 jianzs