unix: add fexecve()

Add missing fexecve() - execute program specified via file descriptor.

Reference: http://pubs.opengroup.org/onlinepubs/9699919799/functions/fexecve.html
This commit is contained in:
Luca Bruno 2017-07-21 15:13:44 +00:00
parent 516df7f773
commit 858d47cd95
No known key found for this signature in database
GPG Key ID: A9834A2252078E4E
2 changed files with 5 additions and 1 deletions

View File

@ -457,7 +457,8 @@ fn main() {
"execv" | // crazy stuff with const/mut
"execve" |
"execvp" |
"execvpe" => true,
"execvpe" |
"fexecve" => true,
"getrlimit" | "getrlimit64" | // non-int in 1st arg
"setrlimit" | "setrlimit64" | // non-int in 1st arg

View File

@ -449,6 +449,9 @@ extern {
-> ::c_int;
pub fn execvp(c: *const c_char,
argv: *const *const c_char) -> ::c_int;
pub fn fexecve(fd: ::c_int, argv: *const *const c_char,
envp: *const *const c_char)
-> ::c_int;
pub fn fork() -> pid_t;
pub fn fpathconf(filedes: ::c_int, name: ::c_int) -> c_long;
pub fn getcwd(buf: *mut c_char, size: ::size_t) -> *mut c_char;