1FEXECVE(3)                 Linux Programmer's Manual                FEXECVE(3)
2
3
4

NAME

6       fexecve - execute program specified via file descriptor
7

SYNOPSIS

9       #include <unistd.h>
10
11       int fexecve(int fd, char *const argv[], char *const envp[]);
12
13   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
14
15       fexecve():
16           Since glibc 2.10:
17               _XOPEN_SOURCE >= 700 || _POSIX_C_SOURCE >= 200809L
18           Before glibc 2.10:
19               _GNU_SOURCE
20

DESCRIPTION

22       fexecve() performs the same task as execve(2), with the difference that
23       the file to be executed is specified via a file descriptor, fd,  rather
24       than  via a pathname.  The file descriptor fd must be opened read-only,
25       and the caller must have permission to execute the file that it  refers
26       to.
27

RETURN VALUE

29       A  successful  call to fexecve() never returns.  On error, the function
30       returns, with a result value of -1, and errno is set appropriately.
31

ERRORS

33       Errors are as for execve(2), with the following additions:
34
35       EINVAL fd is not a valid file descriptor, or argv is NULL, or  envp  is
36              NULL.
37
38       ENOSYS The /proc file system could not be accessed.
39

VERSIONS

41       fexecve() is implemented since glibc 2.3.2.
42

CONFORMING TO

44       POSIX.1-2008.   This  function is not specified in POSIX.1-2001, and is
45       not widely available on other systems.
46

NOTES

48       On Linux, fexecve() is implemented using the proc(5)  file  system,  so
49       /proc needs to be mounted and available at the time of the call.
50

SEE ALSO

52       execve(2)
53

COLOPHON

55       This  page  is  part of release 3.53 of the Linux man-pages project.  A
56       description of the project, and information about reporting  bugs,  can
57       be found at http://www.kernel.org/doc/man-pages/.
58
59
60
61Linux                             2010-09-15                        FEXECVE(3)
Impressum