#another #exec #arg

exec

Use the POSIX exec function to replace the running program with another

5 unstable releases

Uses old Rust 2015

0.3.1 Sep 22, 2017
0.3.0 Jul 13, 2017
0.2.0 Mar 26, 2016
0.1.1 Mar 25, 2016
0.1.0 Mar 25, 2016

#532 in Unix APIs

Download history 10181/week @ 2024-12-15 3276/week @ 2024-12-22 4083/week @ 2024-12-29 8355/week @ 2025-01-05 9603/week @ 2025-01-12 10389/week @ 2025-01-19 11208/week @ 2025-01-26 23250/week @ 2025-02-02 24626/week @ 2025-02-09 28320/week @ 2025-02-16 18079/week @ 2025-02-23 18680/week @ 2025-03-02 17544/week @ 2025-03-09 23528/week @ 2025-03-16 17298/week @ 2025-03-23 15114/week @ 2025-03-30

75,104 downloads per month
Used in 45 crates (39 directly)

MIT/Apache

9KB
97 lines

A simple wrapper around the C library's execvp function.

For examples, see the repository.

We'd love to fully integrate this with std::process::Command, but that module doesn't export sufficient hooks to allow us to add a new way to execute a program.


exec: A Rust library to replace the running program with another

Latest version License Build Status

Documentation

This is a simple Rust wrapper around execvp. It can be used as follows:

let err = exec::Command::new("echo")
    .arg("hello").arg("world")
    .exec();
println!("Error: {}", err);

Note that if exec returns, it will always return an error. There's also a lower-level exec::execvp function if you need to use it.

Dependencies

~230KB