This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: add signal.pidfd_send_signal
Type: Stage: resolved
Components: Library (Lib) Versions: Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, njs
Priority: normal Keywords: patch

Created on 2019-11-06 05:08 by benjamin.peterson, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 17070 merged benjamin.peterson, 2019-11-06 05:12
Messages (4)
msg356091 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2019-11-06 05:08
Add signal.pidfd_send_signal, which will wrap the Linux 5.1 syscall of the same name.
msg356093 - (view) Author: Nathaniel Smith (njs) * (Python committer) Date: 2019-11-06 05:31
I guess a bikeshed question is whether it should be `os.pidfd_send_signal` (like `os.kill`) or `signal.pidfd_send_signal` (like `signal.pthread_kill`).

I don't actually care either way myself :-)
msg356101 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2019-11-06 06:42
Yes, I thought about that a bit. I choose signal because:

1. signal already has some specialized functions that send signals pthread_kill and raise_signal.
2. If we every do want to implement the third parameter of pidfd_send_signal, the signal module already defines a siginfo structseq.
3. (least convincing) os/posix has way too much stuff. I generally think that we should strive to find a good home for new OS-level functionality that isn't the os module.
msg357028 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2019-11-20 04:39
New changeset 7483451577916e693af6d20cf520b2cc7e2174d2 by Benjamin Peterson in branch 'master':
closes bpo-38712: Add signal.pidfd_send_signal. (GH-17070)
https://github.com/python/cpython/commit/7483451577916e693af6d20cf520b2cc7e2174d2
History
Date User Action Args
2022-04-11 14:59:22adminsetgithub: 82893
2019-11-20 04:39:20benjamin.petersonsetstatus: open -> closed
resolution: fixed
messages: + msg357028

stage: patch review -> resolved
2019-11-06 06:42:46benjamin.petersonsetmessages: + msg356101
2019-11-06 05:31:25njssetmessages: + msg356093
2019-11-06 05:12:25benjamin.petersonsetkeywords: + patch
stage: patch review
pull_requests: + pull_request16579
2019-11-06 05:10:42benjamin.petersonsetnosy: + njs
2019-11-06 05:08:46benjamin.petersoncreate