Skip to content
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

Merged
merged 1 commit into from
May 19, 2015
Merged

Conversation

alexcrichton
Copy link
Member

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 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.
@alexcrichton
Copy link
Member Author

r? @aturon

@rust-highfive rust-highfive assigned aturon and unassigned huonw May 16, 2015
@rust-highfive
Copy link
Collaborator

r? @huonw

(rust_highfive has picked a reviewer for you, use r? to override)

@aturon
Copy link
Member

aturon commented May 19, 2015

@bors: r+

@bors
Copy link
Contributor

bors commented May 19, 2015

📌 Commit 1ec7a69 has been approved by aturon

@bors
Copy link
Contributor

bors commented May 19, 2015

⌛ Testing commit 1ec7a69 with merge 87ad28b...

@bors
Copy link
Contributor

bors commented May 19, 2015

💔 Test failed - auto-linux-64-x-android-t

@alexcrichton
Copy link
Member Author

@bors: retry

On Mon, May 18, 2015 at 8:41 PM, bors notifications@github.com wrote:

[image: 💔] Test failed - auto-linux-64-x-android-t
http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/4972


Reply to this email directly or view it on GitHub
#25495 (comment).

@bors
Copy link
Contributor

bors commented May 19, 2015

⌛ Testing commit 1ec7a69 with merge 873664b...

@bors
Copy link
Contributor

bors commented May 19, 2015

💔 Test failed - auto-linux-64-x-android-t

@alexcrichton
Copy link
Member Author

@bors: retry

On Mon, May 18, 2015 at 10:39 PM, bors notifications@github.com wrote:

[image: 💔] Test failed - auto-linux-64-x-android-t
http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/4974


Reply to this email directly or view it on GitHub
#25495 (comment).

@bors
Copy link
Contributor

bors commented May 19, 2015

⌛ Testing commit 1ec7a69 with merge 9512f6a...

@bors
Copy link
Contributor

bors commented May 19, 2015

💔 Test failed - auto-linux-64-x-android-t

@alexcrichton
Copy link
Member Author

@bors: retry

On Tue, May 19, 2015 at 12:38 AM, bors notifications@github.com wrote:

[image: 💔] Test failed - auto-linux-64-x-android-t
http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/4976


Reply to this email directly or view it on GitHub
#25495 (comment).

@bors
Copy link
Contributor

bors commented May 19, 2015

⌛ Testing commit 1ec7a69 with merge f34ff7a...

bors added a commit that referenced this pull request May 19, 2015
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.
@bors bors merged commit 1ec7a69 into rust-lang:master May 19, 2015
@alexcrichton alexcrichton deleted the process-pid branch May 19, 2015 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants