Skip to content
Snippets Groups Projects
Commit a4178c59 authored by Josh Triplett's avatar Josh Triplett
Browse files

siginfo: Provide functions for si_utime and si_stime

The SIGCHLD variant of the siginfo structure also provides fields for
user and system time; expose those as well.
parent e3bce751
No related branches found
No related tags found
No related merge requests found
......@@ -322,6 +322,8 @@ cfg_if! {
si_pid: ::pid_t,
si_uid: ::uid_t,
si_status: ::c_int,
si_utime: ::c_long,
si_stime: ::c_long,
}
// Internal, for casts to access union fields
......@@ -356,6 +358,14 @@ cfg_if! {
pub unsafe fn si_status(&self) -> ::c_int {
self.sifields().sigchld.si_status
}
pub unsafe fn si_utime(&self) -> ::c_long {
self.sifields().sigchld.si_utime
}
pub unsafe fn si_stime(&self) -> ::c_long {
self.sifields().sigchld.si_stime
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment