[proxy] github.com← back | site home | direct (HTTPS) ↗ | proxy home | ◑ dark◐ light
/ cpython Public

Conversation

Copy link
Contributor

vmsp commented Jul 1, 2017

kill() is the same as terminate() but sends SIGKILL instead of SIGTERM. On Windows it's the same as terminate() and wasn't tested. I'd appreciate if someone could try it.

Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).

Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA (this might be simply due to a missing "GitHub Name" entry in your b.p.o account settings). This is necessary for legal reasons before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

Thanks again to your contribution and we look forward to looking at it!

Copy link

@vmsp, thanks for your PR! By analyzing the history of the files in this pull request, we identified @benjaminp, @shibturn and @pitrou to be potential reviewers.

Copy link
Contributor Author

vmsp commented Jul 4, 2017

I signed the CLA. Please re-run the check. Thanks!

Copy link
Member

pitrou left a comment

Choose a reason for hiding this comment

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

Thank you for posting this!
Two things are missing from this PR:

  • a documentation addition in Doc/library/multiprocessing.rst
  • a NEWS entry, which you can create using the blurb tool (see "blurb add")

if os.name != 'nt':
self.assertEqual(p.exitcode, -signal.SIGTERM)

def test_kill(self):
Copy link
Member

Choose a reason for hiding this comment

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

It looks like this is duplicating most of test_terminate. Perhaps those two methods could use a shared helper?

acquired a lock or semaphore etc. then terminating it is liable to
cause other processes to deadlock.

.. method:: kill()
Copy link
Member

Choose a reason for hiding this comment

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

Since this is a new method, you need a versionadded marker a well (see above the sentinel attribute for an example).

Copy link
Member

pitrou commented Jul 18, 2017

Sorry for the delay, there's one last nit :-) If you don't have time, just say so, I can add it myself.

Copy link
Contributor Author

vmsp commented Jul 18, 2017

No problem! Hope it's alright now.

Copy link
Member

pitrou commented Jul 18, 2017

It is. I'm merging now. Thank you for making this!

pitrou merged commit ba75af7 into python:master Jul 18, 2017
vmsp deleted the issue-30794 branch July 18, 2017 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants