closes bpo-38712: Add signal.pidfd_send_signal. by benjaminp · Pull Request #17070 · python/cpython (original) (raw)

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

Already on GitHub?Sign in to your account

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

benjaminp

This exposes a Linux-specific syscall for sending a signal to a process
identified by a file descriptor rather than a pid.

For simplicity, we don't support the siginfo_t parameter to the syscall. This
parameter allows implementing a pidfd version of rt_sigqueueinfo(2), which
Python also doesn't support.

https://bugs.python.org/issue38712

@benjaminp

This exposes a Linux-specific syscall for sending a signal to a process identified by a file descriptor rather than a pid.

For simplicity, we don't support the siginfo_t parameter to the syscall. This parameter allows implementing a pidfd version of rt_sigqueueinfo(2), which Python also doesn't support.

corona10

pidfd: int
signalnum: int
siginfo: object = None

Choose a reason for hiding this comment

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

IMHO, we already have a SiginfoType for siginfo.
Is there any reason not to check the type for it?

Choose a reason for hiding this comment

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

Right now this parameter is required to be None.

Choose a reason for hiding this comment

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

corona10

Choose a reason for hiding this comment

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

@benjaminp I left a comment on this PR except that PR looks good to me.

asvetlov

jacobneiltaylor pushed a commit to jacobneiltaylor/cpython that referenced this pull request

Dec 5, 2019

@benjaminp

This exposes a Linux-specific syscall for sending a signal to a process identified by a file descriptor rather than a pid.

For simplicity, we don't support the siginfo_t parameter to the syscall. This parameter allows implementing a pidfd version of rt_sigqueueinfo(2), which Python also doesn't support.

shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request

Jan 31, 2020

@benjaminp @shihai1991

This exposes a Linux-specific syscall for sending a signal to a process identified by a file descriptor rather than a pid.

For simplicity, we don't support the siginfo_t parameter to the syscall. This parameter allows implementing a pidfd version of rt_sigqueueinfo(2), which Python also doesn't support.