Skip to content
This repository was archived by the owner on Dec 12, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants