File: README.md

package info (click to toggle)
rust-exec 0.3.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 112 kB
  • sloc: makefile: 4
file content (17 lines) | stat: -rw-r--r-- 784 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# `exec`: A Rust library to replace the running program with another

[![Latest version](https://img.shields.io/crates/v/exec.svg)](https://crates.io/crates/exec) [![License](https://img.shields.io/crates/l/exec.svg)](http://www.apache.org/licenses/LICENSE-2.0) [![Build Status](https://travis-ci.org/faradayio/exec-rs.svg?branch=master)](https://travis-ci.org/faradayio/exec-rs)

[Documentation](http://faradayio.github.io/exec-rs/exec/index.html)

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

```rust
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.