Change current_pid to just id
.
This commit is contained in:
parent
ba7575886e
commit
29b319b6b2
1 changed files with 4 additions and 3 deletions
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue