Skip to content

Rollup of 9 pull requests #46130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Nov 21, 2017
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
1bfc6c1
impl From<T> for Mutex<T>
Enet4 Nov 18, 2017
0855ea1
impl From<T> for RwLock<T>
Enet4 Nov 18, 2017
44da4a0
Add doc for `Read`ing from `&str` and some related cleanup
vitiral Nov 18, 2017
1e42d5f
Add process::parent_id
sfackler Nov 19, 2017
0f29e71
Fixes spelling error in COMPILER_TESTS.md
nyanzebra Nov 20, 2017
998e3c1
Fix typo in MRI "cannot move out of borrowed content"
ritiek Nov 20, 2017
941852e
Fix some docs summary nits
malbarbo Oct 6, 2017
296aa96
[rustllvm] Use report_fatal_error over llvm_unreachable
Nov 20, 2017
cbcaf73
Print the address of the pointed value in Pointer impl for Rc and Arc
malbarbo Nov 20, 2017
b3baa83
Fix doc tests for trim_right_matches
Arzte Nov 20, 2017
f69d4d4
Fix result for assert_eq
Arzte Nov 20, 2017
2c16502
Rollup merge of #46082 - Enet4:mutex_from, r=sfackler
kennytm Nov 20, 2017
3b1cf4d
Rollup merge of #46088 - vitiral:read_doc, r=steveklabnik
kennytm Nov 20, 2017
fe2ec73
Rollup merge of #46092 - sfackler:ppid, r=alexcrichton
kennytm Nov 20, 2017
ac92ea5
Rollup merge of #46107 - nyanzebra:develop, r=kennytm
kennytm Nov 20, 2017
b32d9ad
Rollup merge of #46119 - ritiek:master, r=arielb1
kennytm Nov 20, 2017
04b9c25
Rollup merge of #46121 - malbarbo:rc_arc_pointer, r=dtolnay
kennytm Nov 20, 2017
07d16a7
Rollup merge of #46122 - malbarbo:docs, r=steveklabnik
kennytm Nov 20, 2017
2a2b2f4
Rollup merge of #46124 - rkruppe:no-llvm_unreachable, r=arielb1
kennytm Nov 20, 2017
079a6e4
Rollup merge of #46128 - Coding-Doctors:patch-1, r=dtolnay
kennytm Nov 20, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/libstd/sys/redox/os.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,3 +213,7 @@ pub fn exit(code: i32) -> ! {
pub fn getpid() -> u32 {
syscall::getpid().unwrap() as u32
}

pub fn getppid() -> u32 {
syscall::getppid().unwrap() as u32
}
6 changes: 6 additions & 0 deletions src/libstd/sys/unix/ext/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,9 @@ impl IntoRawFd for process::ChildStderr {
self.into_inner().into_fd().into_raw()
}
}

/// Returns the OS-assigned process identifier associated with this process's parent.
#[unstable(feature = "unix_ppid", issue = "46104")]
pub fn parent_id() -> u32 {
::sys::os::getppid()
}
4 changes: 4 additions & 0 deletions src/libstd/sys/unix/os.rs
Original file line number Diff line number Diff line change
Expand Up @@ -515,3 +515,7 @@ pub fn exit(code: i32) -> ! {
pub fn getpid() -> u32 {
unsafe { libc::getpid() as u32 }
}

pub fn getppid() -> u32 {
unsafe { libc::getppid() as u32 }
}