We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
getppid
None
1 parent 81021ad commit feb5227Copy full SHA for feb5227
src/process/id.rs
@@ -113,6 +113,9 @@ pub fn getpid() -> Pid {
113
114
/// `getppid()`—Returns the parent process' ID.
115
///
116
+/// This will return `None` if the current process has no parent (or no parent accessible in the
117
+/// current PID namespace), such as if the current process is an init process (PID 1).
118
+///
119
/// # References
120
/// - [POSIX]
121
/// - [Linux]
0 commit comments