We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
id
1 parent ba75758 commit 29b319bCopy full SHA for 29b319b
src/libstd/process.rs
@@ -1174,14 +1174,15 @@ pub fn abort() -> ! {
1174
/// Basic usage:
1175
///
1176
/// ```no_run
1177
-/// use std::process::current_pid;
+/// #![feature(getpid)]
1178
+/// use std::process;
1179
-/// println!("My pid is {}", current_pid());
1180
+/// println!("My pid is {}", process::id());
1181
/// ```
1182
1183
1184
#[unstable(feature = "getpid", issue = "44971", reason = "recently added")]
-pub fn current_pid() -> u32 {
1185
+pub fn id() -> u32 {
1186
::sys::os::getpid()
1187
}
1188
0 commit comments