#replace #process #another #posix #running #arg #execvp

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

#568 in Unix APIs

Download history 7097/week @ 2024-03-14 10131/week @ 2024-03-21 7138/week @ 2024-03-28 9203/week @ 2024-04-04 7930/week @ 2024-04-11 10004/week @ 2024-04-18 13052/week @ 2024-04-25 9446/week @ 2024-05-02 12191/week @ 2024-05-09 10458/week @ 2024-05-16 9922/week @ 2024-05-23 10408/week @ 2024-05-30 9374/week @ 2024-06-06 9724/week @ 2024-06-13 14891/week @ 2024-06-20 7523/week @ 2024-06-27

42,966 downloads per month
Used in 44 crates (38 directly)

MIT/Apache

9KB
97 lines

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.


lib.rs:

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.

Dependencies

~230KB