GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-131913: multiprocessing: add interrupt for POSIX by pulkin · Pull Request #132453 · python/cpython

Conversation

@pulkin

@pulkin pulkin commented Apr 12, 2025 •
edited by ZeroIntensity
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor
  • Issue: Add multiprocessing.Process.interrupt #131913

📚 Documentation preview 📚: https://cpython-previews--132453.org.readthedocs.build/en/132453/library/multiprocessing.html#multiprocessing.Process.interrupt

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@pulkin
multiprocessing: interrupt
1a1823d
@pulkin
pulkin requested a review from gpshead as a code owner April 12, 2025 19:36
@bedevere-app bedevere-app Bot added the awaiting review label Apr 12, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Apr 12, 2025
Add multiprocessing.Process.interrupt #131913
Closed
pulkin and others added 6 commits April 12, 2025 21:41
@pulkin
docs: fix ticks
8bb9624
@blurb-it
📜🤖 Added by blurb_it.
5387fe7
@pulkin
CHANGELOG: fix
6b031b5
@pulkin
CHANGELOG: fix
20a56a0
@pulkin
tests: fix
a3359bc
@pulkin
tests: fix
43a2a5c
picnixz
picnixz reviewed Apr 12, 2025
View reviewed changes

@picnixz picnixz left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Can you add a test where we register a signal.signal handler?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Doc/library/multiprocessing.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/multiprocessing/process.py Outdated

def interrupt(self):
'''
Terminate process; sends SIGINT signal or uses TerminateProcess()

@picnixz picnixz Apr 12, 2025

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Does it use TerminateProcess()?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Misc/NEWS.d/next/Library/2025-04-12-19-42-51.gh-issue-131913.twOx7K.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/_test_multiprocessing.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

pulkin and others added 11 commits April 13, 2025 12:06
@pulkin @picnixz
docs: update
361e068
Co-authored-by: Bénédikt Tran <[email protected]>
@pulkin
multiprocessing: fix docstring
8082059
@pulkin
news: update
67a951e
@pulkin
whatsnew: add the change
afeaee7
@pulkin @picnixz
tests: decorate interrupt test
ce60363
Co-authored-by: Bénédikt Tran <[email protected]>
@pulkin
Merge remote-tracking branch 'origin/pulkin-131913' into pulkin-131913
127dba6
@pulkin
tests: add another interrupt test
8a9cf33
@pulkin
docs: more
5018031
@pulkin
docs: ticks
e278f8f
@pulkin
docs: backticks
cc57ab5
@pulkin
tests: fix the new test
8109864
@ZeroIntensity ZeroIntensity added the topic-multiprocessing label Apr 13, 2025
@gpshead gpshead added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Apr 22, 2025
@bedevere-bot

bedevere-bot commented Apr 22, 2025

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @gpshead for commit 8109864 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F132453%2Fmerge

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Apr 22, 2025
gpshead
gpshead approved these changes Apr 23, 2025
View reviewed changes
Comment thread Lib/test/_test_multiprocessing.py
self.assertEqual(exitcode, 1)
# exit code 1 is hard-coded for uncaught exceptions
# (KeyboardInterrupt in this case)
# in multiprocessing.BaseProcess._bootstrap

@gpshead gpshead Apr 22, 2025

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

interesting... but probably went unnoticed because these are wholly multiprocessing managed processes so the exit code reflecting the SIGINT signal was never important there like it is for our main python process which IIRC jumps through hoops to turn KeyboardInterrupt back into a SIGINT exit status.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Apr 23, 2025
@gpshead
gpshead merged commit 77605fa into python:main Apr 23, 2025
@bedevere-app bedevere-app Bot removed the awaiting merge label Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@picnixz picnixz picnixz left review comments
@gpshead gpshead gpshead approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

topic-multiprocessing

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@pulkin @bedevere-bot @gpshead @picnixz @ZeroIntensity
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.