How to send unix signals like SIGINT or SIGTERM to process being debugged in IntelliJ

Answered

I would like to test my program's ability to gracefully handle unix signals.

Is there a way to send SIGINT or kill -9 or other such signals to the process running in the debugger?

(This is for IntelliJ on OSX - unix-like system)

Thank you

 

1
5 comments

There is Exit icon for graceful exit in the toolbar which sends SIGINT. There is no way to handle SIGKILL.

1

In debug mode, I'm finding it sends SIGHUP. Is there a way to change that to SIGINT?

PyCharm 2019.2.1 (Professional Edition)
Build #PY-192.6262.63, built on August 22, 2019

0

Ian,

Please follow the related request: https://youtrack.jetbrains.com/issue/PY-21940

0

@Yaroslav Bedrov  It turns out that it first sends SIGINT, then SIGHUP when I'm debugging on a remote server.

I've added a comment to an old issue here: https://youtrack.jetbrains.com/issue/PY-13316#focus=streamItem-27-3698916.0-0

(looks like nobody's watching that though, perhaps I should make a new issue?)

0

Ian,

You added comment to closed issue. It's better to report new request.

0

Please sign in to leave a comment.