-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
std: Add an unstable method Child::id #25495
Conversation
This commits adds a method to the `std::process` module to get the process identifier of the child as a `u32`. On Windows the underlying identifier is already a `u32`, and on Unix the type is typically defined as `c_int` (`i32` for almost all our supported platforms), but the actually pid is normally a small positive number. Eventually we may add functions to load information about a process based on its identifier or the ability to terminate a process based on its identifier, but for now this function should enable this sort of functionality to exist outside the standard library.
r? @aturon |
r? @huonw (rust_highfive has picked a reviewer for you, use r? to override) |
@bors: r+ |
📌 Commit 1ec7a69 has been approved by |
⌛ Testing commit 1ec7a69 with merge 87ad28b... |
💔 Test failed - auto-linux-64-x-android-t |
@bors: retry On Mon, May 18, 2015 at 8:41 PM, bors notifications@github.com wrote:
|
⌛ Testing commit 1ec7a69 with merge 873664b... |
💔 Test failed - auto-linux-64-x-android-t |
@bors: retry On Mon, May 18, 2015 at 10:39 PM, bors notifications@github.com wrote:
|
⌛ Testing commit 1ec7a69 with merge 9512f6a... |
💔 Test failed - auto-linux-64-x-android-t |
@bors: retry On Tue, May 19, 2015 at 12:38 AM, bors notifications@github.com wrote:
|
This commits adds a method to the `std::process` module to get the process identifier of the child as a `u32`. On Windows the underlying identifier is already a `u32`, and on Unix the type is typically defined as `c_int` (`i32` for almost all our supported platforms), but the actually pid is normally a small positive number. Eventually we may add functions to load information about a process based on its identifier or the ability to terminate a process based on its identifier, but for now this function should enable this sort of functionality to exist outside the standard library.
This commits adds a method to the
std::process
module to get the processidentifier of the child as a
u32
. On Windows the underlying identifier isalready a
u32
, and on Unix the type is typically defined asc_int
(i32
foralmost all our supported platforms), but the actually pid is normally a small
positive number.
Eventually we may add functions to load information about a process based on its
identifier or the ability to terminate a process based on its identifier, but
for now this function should enable this sort of functionality to exist outside
the standard library.