Skip to content

Commit

Permalink
Change current_pid to just id.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmccombs committed Oct 8, 2017
1 parent ba75758 commit 29b319b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/libstd/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1174,14 +1174,15 @@ pub fn abort() -> ! {
/// Basic usage:
///
/// ```no_run
/// use std::process::current_pid;
/// #![feature(getpid)]
/// use std::process;
///
/// println!("My pid is {}", current_pid());
/// println!("My pid is {}", process::id());
/// ```
///
///
#[unstable(feature = "getpid", issue = "44971", reason = "recently added")]
pub fn current_pid() -> u32 {
pub fn id() -> u32 {
::sys::os::getpid()
}

Expand Down

0 comments on commit 29b319b

Please sign in to comment.