Registry / utility / exec
library0.3.1rscratesunverified

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

# Cargo.toml [dependencies] exec = "0.3.1"
INSTALL
IMPORT
SIG · EXEC
E
exec
utilityrustv0.3.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

execvp
use exec::execvp;

Replaces the current process with the 'ls -l' command.

use exec::execvp; use std::ffi::CString; fn main() { let cmd = CString::new("ls").unwrap(); let args = vec![CString::new("-l").unwrap()]; execvp(&cmd, &args).unwrap(); }
Debug
Known issues
breakingexecvp only works on Unix-like systems; will panic on Windows.
fix
Use conditional compilation or a cross-platform alternative like std::process::Command.
affects: >=0.3.0
Upgrade
Version history
0.3.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
exec — cargo add exec · libregistry