Skip to content

gh-129165: Clarify that signal.raise_signal() sends signal to calling thread #129167

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Doc/library/signal.rst
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ The :mod:`signal` module defines the following functions:

.. function:: raise_signal(signum)

Sends a signal to the calling process. Returns nothing.
Sends a signal to the calling thread, not the entire process. Returns nothing.
Copy link
Member

Choose a reason for hiding this comment

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

  • While we're here, it might be worth mentioning that on POSIX systems, this is equivalent to calling signal.pthread_kill(threading.get_ident(), signum). Or, we could just link to the manpages for raise.
  • This is the correct description for POSIX, but what about Windows?


.. versionadded:: 3.8

Expand Down
Loading