#replace #posix #process #running #another #execute #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

#371 in Operating systems

Download history 10374/week @ 2024-08-12 10121/week @ 2024-08-19 11093/week @ 2024-08-26 10749/week @ 2024-09-02 11545/week @ 2024-09-09 11046/week @ 2024-09-16 12832/week @ 2024-09-23 13382/week @ 2024-09-30 13893/week @ 2024-10-07 11428/week @ 2024-10-14 11113/week @ 2024-10-21 11592/week @ 2024-10-28 11242/week @ 2024-11-04 9447/week @ 2024-11-11 10570/week @ 2024-11-18 7960/week @ 2024-11-25

39,675 downloads per month
Used in 46 crates (40 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