Skip to content

Commit 0b7abd9

Browse files
committed
Auto merge of rust-lang#689 - lucab:ups/fexecve, r=alexcrichton
unix: add fexecve() Add missing fexecve() - execute program specified via file descriptor. Reference: http://pubs.opengroup.org/onlinepubs/9699919799/functions/fexecve.html
2 parents 9bbfe4b + 858d47c commit 0b7abd9

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

libc-test/build.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,8 @@ fn main() {
461461
"execv" | // crazy stuff with const/mut
462462
"execve" |
463463
"execvp" |
464-
"execvpe" => true,
464+
"execvpe" |
465+
"fexecve" => true,
465466

466467
"getrlimit" | "getrlimit64" | // non-int in 1st arg
467468
"setrlimit" | "setrlimit64" | // non-int in 1st arg

src/unix/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,9 @@ extern {
449449
-> ::c_int;
450450
pub fn execvp(c: *const c_char,
451451
argv: *const *const c_char) -> ::c_int;
452+
pub fn fexecve(fd: ::c_int, argv: *const *const c_char,
453+
envp: *const *const c_char)
454+
-> ::c_int;
452455
pub fn fork() -> pid_t;
453456
pub fn fpathconf(filedes: ::c_int, name: ::c_int) -> c_long;
454457
pub fn getcwd(buf: *mut c_char, size: ::size_t) -> *mut c_char;

0 commit comments

Comments
 (0)