Skip to content

Conversation

@Lin1st
Copy link

@Lin1st Lin1st commented Mar 23, 2025

Resolves #33

Key changes:

  1. Introduced a cunstom InterpreterExit exception in Python to signal interpreter termination
  2. Mapped InterpreterExit to a Java-side exception GhidrathonInterpreterExitException to break out of the interpreter input thread
  3. Gracefully shut down interpreter components (inputThread, console, interactiveScript, and interactiveTaskMonitor) when sys.exit() is called
  4. Re-registered a fresh interpreter panel via InterpreterPanelService to ensure Ghidrathon remains available in the Ghidra’s menu after exit and let the user activate it manually later

Note: Clicking the close [X] button in the interpreter window only hides it (Ghidra's standard dockable panel behavior(?)). However, calling sys.exit() now performs a full shutdown and re-registration of the console

@google-cla
Copy link

google-cla bot commented Mar 23, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@Lin1st Lin1st force-pushed the enhance/33-close-interpreter-window-when-sys.exit-called branch from 7abe28e to 288b0b2 Compare March 23, 2025 21:33
@Lin1st Lin1st force-pushed the enhance/33-close-interpreter-window-when-sys.exit-called branch 3 times, most recently from ff4ef7f to 2396651 Compare March 23, 2025 23:36
@Lin1st Lin1st force-pushed the enhance/33-close-interpreter-window-when-sys.exit-called branch from 2396651 to 1b8bd45 Compare March 23, 2025 23:40
@Lin1st Lin1st marked this pull request as ready for review March 28, 2025 00:11
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.

close interpreter window when sys.exit called

1 participant