Skip to content

Commit 750add1

Browse files
authored
process: Add aliaseses for parent_process_death_signal (#677)
I went to search in the docs for `pdeathsig` bindings and almost didn't find it. The wrapped naming is definitely better, but add aliases for the same reason as we do elsewhere.
1 parent 730b0d2 commit 750add1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/process/prctl.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ const PR_GET_PDEATHSIG: c_int = 2;
7878
/// [Linux: `prctl(PR_GET_PDEATHSIG,...)`]: https://man7.org/linux/man-pages/man2/prctl.2.html
7979
/// [FreeBSD: `procctl(PROC_PDEATHSIG_STATUS,...)`]: https://man.freebsd.org/cgi/man.cgi?query=procctl&sektion=2
8080
#[inline]
81+
#[doc(alias = "PR_GET_PDEATHSIG")]
8182
pub fn parent_process_death_signal() -> io::Result<Option<Signal>> {
8283
unsafe { prctl_get_at_arg2_optional::<c_int>(PR_GET_PDEATHSIG) }.map(Signal::from_raw)
8384
}
@@ -93,6 +94,7 @@ const PR_SET_PDEATHSIG: c_int = 1;
9394
/// [Linux: `prctl(PR_SET_PDEATHSIG,...)`]: https://man7.org/linux/man-pages/man2/prctl.2.html
9495
/// [FreeBSD: `procctl(PROC_PDEATHSIG_CTL,...)`]: https://man.freebsd.org/cgi/man.cgi?query=procctl&sektion=2
9596
#[inline]
97+
#[doc(alias = "PR_SET_PDEATHSIG")]
9698
pub fn set_parent_process_death_signal(signal: Option<Signal>) -> io::Result<()> {
9799
let signal = signal.map_or(0_usize, |signal| signal as usize);
98100
unsafe { prctl_2args(PR_SET_PDEATHSIG, signal as *mut _) }.map(|_r| ())

0 commit comments

Comments
 (0)