Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add (primitive) version of SIGTERM handling to jpype #1

Merged
merged 7 commits into from
Nov 21, 2024

Conversation

dfangl
Copy link
Member

@dfangl dfangl commented Nov 19, 2024

Motivation

Currently, jpype does not support handing the control back to python on a SIGTERM process - only for SIGINT. Here, I added a very crude version of SIGTERM handling similar to the SIGINT handling - to be refined.

I also added a github workflow to build wheels for cpython 3.11&3.12 on manylinux, to allow us publishing our own wheel until we can (potentially) upstream this work.

Changes

  • Add github actions build run
  • Add SIGTERM handling for jpype if interrupt=False.

Copy link
Member

@joe4dev joe4dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Object intr = Signal.getDeclaredConstructor(String.class).newInstance("INT");
method.invoke(null, intr, handler);
method.invoke(null, intr, getSignalHandler(SignalHandler, 2));
Object intrTerm = Signal.getDeclaredConstructor(String.class).newInstance("TERM");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new SIGTERM handling seems the main part here

@alexrashed alexrashed merged commit 44035ee into master Nov 21, 2024
10 checks passed
@alexrashed alexrashed deleted the sigterm-handling branch November 21, 2024 17:38
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.

3 participants