Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
Emir2099 wants to merge3 commits intopython:main
base:main
Choose a base branch
Loading
fromEmir2099:fix-signal-docs

Conversation

Emir2099
Copy link

@Emir2099Emir2099 commentedJan 22, 2025
edited by github-actionsbot
Loading

The documentation for signal.raise_signal(signum) previously stated that it
"sends a signal to the calling process," which is misleading. In reality,
the signal is sent to the calling thread, which may cause different behavior
in multi-threaded applications.

This PR updates the documentation to clarify thatraise_signal() sends
the signal to the calling thread instead of the entire process.

Fixesgh-129165.


📚 Documentation preview 📚:https://cpython-previews--129167.org.readthedocs.build/

@@ -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 callingthread, not the entireprocess. Returns nothing.

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 callingsignal.pthread_kill(threading.get_ident(), signum). Or, we could just link to themanpages forraise.
  • This is the correct description for POSIX, but what about Windows?

@ZeroIntensityZeroIntensity added needs backport to 3.12only security fixes needs backport to 3.13bugs and security fixes labelsJan 22, 2025
@hugovkhugovk removed the needs backport to 3.12only security fixes labelApr 10, 2025
@python-cla-bot
Copy link

python-cla-botbot commentedApr 18, 2025
edited
Loading

All commit authors signed the Contributor License Agreement.

CLA signed

@serhiy-storchakaserhiy-storchaka added the needs backport to 3.14bugs and security fixes labelMay 8, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ZeroIntensityZeroIntensityZeroIntensity left review comments

Assignees
No one assigned
Labels
awaiting reviewdocsDocumentation in the Doc dirneeds backport to 3.13bugs and security fixesneeds backport to 3.14bugs and security fixesskip news
Projects
Status: Todo
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

raise_signal docs imply process receives signal not thread
4 participants
@Emir2099@ZeroIntensity@hugovk@serhiy-storchaka

[8]ページ先頭

©2009-2025 Movatter.jp