aboutsummaryrefslogtreecommitdiffstats
path: root/src/unistd/fexec.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/unistd/fexec.c')
-rw-r--r--src/unistd/fexec.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/unistd/fexec.c b/src/unistd/fexec.c
index 36352ce..ec592d1 100644
--- a/src/unistd/fexec.c
+++ b/src/unistd/fexec.c
@@ -24,6 +24,17 @@
/**
+ * The directory where all the process's file descriptors are available.
+ */
+#if defined(_LINUX_)
+# define FD_PATH "/proc/self/fd" /* /dev/fd works but it is a symbolic link. */
+#else
+# define FD_PATH "/dev/fd"
+#endif
+
+
+
+/**
* The current environment variables.
*
* @since Always.
@@ -186,12 +197,6 @@ int fexecv(int fd, char* const argv[])
*/
int fexecve(int fd, char* const argv[], char* const envp[])
{
-#if defined(_LINUX_)
-# define FD_PATH "/proc/self/fd" /* /dev/fd works but it is a symbolic link. */
-#else
-# define FD_PATH "/dev/fd"
-#endif
-
char pathname[sizeof(FD_PATH "//") + 3 * sizeof(int)];
int saved_errno;