Support get signal sender pid in signal::recv #7148
Labels
A-tokio
Area: The main tokio crate
C-feature-request
Category: A feature request.
M-signal
Module: tokio/signal
Is your feature request related to a problem? Please describe.
We want to know signal sender pid to do some logic.
Describe the solution you'd like
https://docs.rs/tokio/latest/tokio/signal/unix/struct.Signal.html#method.recv
change signature from
to
SigInfo should have kernel
siginfo_t##_pid
https://elixir.bootlin.com/linux/v6.13.1/source/include/uapi/asm-generic/siginfo.h#L40
Additional context
https://stackoverflow.com/questions/11508427/linux-c-upon-receiving-a-signal-is-it-possible-to-know-the-pid-of-the-sender
The text was updated successfully, but these errors were encountered: