Skip to content

Commit 3834d6e

Browse files
committed
Clarify documentation about execvp first argument
1 parent 36a984b commit 3834d6e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ use nix::{
2727
///
2828
/// @example
2929
/// import { execvp } from '@alphahydrae/exec';
30-
/// execvp('ls', ['ls', '-l', '.']);
30+
/// execvp('ls', ['/bin/ls', '-l', '.']);
3131
///
3232
/// @param {string} file The file to execute. If not a path, the PATH environment
3333
/// variable is searched.
3434
/// @param {string[]} args The arguments to pass to the new process. Note that
35-
/// the first argument should be the name of the file
36-
/// being executed.
35+
/// the first argument, by convention, should point to
36+
/// the filename associated with the file being executed.
3737
/// @throws {Error} If the execvp system call fails.
3838
pub fn execvp(file: String, args: Vec<String>) -> Result<()> {
3939
let file = convert_string(file.clone())?;

0 commit comments

Comments
 (0)