Skip to content
Snippets Groups Projects

Enable the -Xrs flag when starting the JVM to allow signals to be propagated

1 unresolved thread

Enable the -Xrs flag when starting the JVM to allow signals to be propagated fully back to Python and on to other systems such as Qt.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Philip Elson added 1 commit

    added 1 commit

    • 1e43ddb1 - Move the minimum JPype1 version up to 1.1.

    Compare with previous version

  • Philip Elson added 1 commit

    added 1 commit

    • 0c58a8d9 - Move the minimum JPype1 version up to 1.1.

    Compare with previous version

  • Another example script, which doesn't involve Qt:

    from time import sleep
    import signal
    from jpype import *
    
    startJVM(
        getDefaultJVMPath(),
        #'-Xrs',
    )
    
    def handler(signum, frame):
        raise KeyboardInterrupt()
    
    #the overloaded signal handling has to be here to make KeyboardInterrupt work again
    #please comment out to check how the script dies without doing any clean-up
    #signal.signal(signal.SIGINT, handler)
    
    try:
        while True:
            print(".", end="", flush=True)
            sleep(1)
    except (BaseException, KeyboardInterrupt) as e:
        print(e, type(e))
    finally:
        print("This should be always executed", flush=True)
    
  • merged

  • Philip Elson mentioned in commit ff3a6b5c

    mentioned in commit ff3a6b5c

  • Please register or sign in to reply
    Loading