Skip to content

wrong doc on core::run::run_program #4983

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

Closed
Kimundi opened this issue Feb 17, 2013 · 2 comments
Closed

wrong doc on core::run::run_program #4983

Kimundi opened this issue Feb 17, 2013 · 2 comments
Milestone

Comments

@Kimundi
Copy link
Member

Kimundi commented Feb 17, 2013

The docs state it returns an process id, but it's actually the exit code.

/**
 * Spawns a process and waits for it to terminate
 *
 * # Arguments
 *
 * * prog - The path to an executable
 * * args - Vector of arguments to pass to the child process
 *
 * # Return value
 *
 * The process id
 */
pub fn run_program(prog: &str, args: &[~str]) -> int {
    let pid = spawn_process(prog, args, &None, &None,
                            0i32, 0i32, 0i32);
    if pid == -1 as pid_t { fail!(); }
    return waitpid(pid);
}
catamorphism added a commit to catamorphism/rust that referenced this issue Mar 25, 2013
@catamorphism
Copy link
Contributor

Fixed in #5542 , which is pending bors.

@ghost ghost assigned catamorphism Mar 25, 2013
@catamorphism
Copy link
Contributor

Merged, #5542

bors added a commit to rust-lang-ci/rust that referenced this issue May 2, 2020
…r=yaahc

Issue4983 bool updates

changelog: Check for bool inequality comparison that might be written more concisely

Fixes rust-lang#4983
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

No branches or pull requests

2 participants