fexecve(3) Library Functions Manual fexecve(3) fexecve - , LIBRARY Standard C library (libc, -lc) #include int fexecve(int fd, char *const argv[], char *const envp[]); glibc (. feature_test_macros(7)): fexecve(): glibc 2.10: _POSIX_C_SOURCE >= 200809L glibc 2.10: _BSD_SOURCE fexecve() , execve(2), fd, . fd (O_RDONLY) O_PATH , . A successful call to fexecve() never returns. On error, the function does return, with a result value of -1, and errno is set to indicate the error. execve(2), : EINVAL fd argv NULL, envp NULL. ENOENT fd close-on-exec fd . . ENOSYS execveat(2) /proc . attributes(7). +----------------------------+----------------------------------------------------------+--------------------------+ | | | | +----------------------------+----------------------------------------------------------+--------------------------+ |fexecve() | | MT-Safe | +----------------------------+----------------------------------------------------------+--------------------------+ POSIX.1-2008. glibc 2.3.2. Linux c glibc 2.26 fexecve() proc(5), /proc . glibc 2.27, execveat(2), fexecve() /proc . fexecve() -- ( ) . , execve(2) , (, ). fexecve() fexecve() -- , . fexecve() -- -- fd , . . -, ( , , , ). -, fexecve() , -- , , ( ). fd (. ., , ( #!) -- fd, fexecve() ENOENT. , fd , --. -- fd, , , . . execve(2), execveat(2) Azamat Hackimov , Dmitry Bolkhovskikh , Yuri Kozlov ; GNU 3 , . . , , . Linux man-pages 6.06 31 2023 . fexecve(3)