#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

#366 in Operating systems

Download history 9348/week @ 2024-07-21 9826/week @ 2024-07-28 10144/week @ 2024-08-04 10759/week @ 2024-08-11 10264/week @ 2024-08-18 11070/week @ 2024-08-25 10682/week @ 2024-09-01 11508/week @ 2024-09-08 11168/week @ 2024-09-15 12409/week @ 2024-09-22 13514/week @ 2024-09-29 14099/week @ 2024-10-06 11455/week @ 2024-10-13 11028/week @ 2024-10-20 11711/week @ 2024-10-27 11178/week @ 2024-11-03

46,057 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