Skip to content

Add multiprocessing.Process.kill() #74977

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

Closed
pitrou opened this issue Jun 28, 2017 · 4 comments
Closed

Add multiprocessing.Process.kill() #74977

pitrou opened this issue Jun 28, 2017 · 4 comments
Labels
3.7 (EOL) end of life stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@pitrou
Copy link
Member

pitrou commented Jun 28, 2017

BPO 30794
Nosy @pitrou, @applio, @vmsp
PRs
  • bpo-30794: added kill() method to multiprocessing.Process #2528
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2017-07-18.15:34:58.644>
    created_at = <Date 2017-06-28.20:03:41.527>
    labels = ['3.7', 'type-feature', 'library']
    title = 'Add multiprocessing.Process.kill()'
    updated_at = <Date 2017-07-18.15:35:11.987>
    user = 'https://github.com/pitrou'

    bugs.python.org fields:

    activity = <Date 2017-07-18.15:35:11.987>
    actor = 'pitrou'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-07-18.15:34:58.644>
    closer = 'pitrou'
    components = ['Library (Lib)']
    creation = <Date 2017-06-28.20:03:41.527>
    creator = 'pitrou'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 30794
    keywords = []
    message_count = 4.0
    messages = ['297216', '297681', '297685', '298600']
    nosy_count = 3.0
    nosy_names = ['pitrou', 'davin', 'vmsp']
    pr_nums = ['2528']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue30794'
    versions = ['Python 3.7']

    @pitrou
    Copy link
    Member Author

    pitrou commented Jun 28, 2017

    subprocess.Popen() has both terminate() and kill() methods. Under Unix, the first sends SIGTERM and the second SIGKILL.

    multiprocessing.Process() only has terminate(), which sends SIGTERM. It may be useful to add a kill() method to send SIGKILL (on Windows, kill() would be the same as terminate()).

    One possible use case is when the child process has redefined the SIGTERM handler to something that doesn't trigger an exit (or takes a long time to exit). Or if something non-interruptible is running...

    @pitrou pitrou added 3.7 (EOL) end of life stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Jun 28, 2017
    @vmsp
    Copy link
    Mannequin

    vmsp mannequin commented Jul 4, 2017

    Hey, I submitted a PR and just signed the CLA. If you could please take a look. Thanks!

    @pitrou
    Copy link
    Member Author

    pitrou commented Jul 4, 2017

    Thank you Vitor! I posted some review comments on your PR.

    @pitrou
    Copy link
    Member Author

    pitrou commented Jul 18, 2017

    New changeset ba75af7 by Antoine Pitrou (Vitor Pereira) in branch 'master':
    bpo-30794: added kill() method to multiprocessing.Process (bpo-2528)
    ba75af7

    @pitrou pitrou added the invalid label Jul 18, 2017
    @pitrou pitrou closed this as completed Jul 18, 2017
    @pitrou pitrou removed the invalid label Jul 18, 2017
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant