summaryrefslogtreecommitdiffstats
path: root/runfd.c
diff options
context:
space:
mode:
Diffstat (limited to 'runfd.c')
-rw-r--r--runfd.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/runfd.c b/runfd.c
new file mode 100644
index 0000000..6a92bb6
--- /dev/null
+++ b/runfd.c
@@ -0,0 +1,15 @@
+#include <stdio.h>
+#include <err.h>
+#include <unistd.h>
+#include <fcntl.h>
+
+char *args[] = { "batchrun", NULL };
+
+int
+main()
+{
+ //fcntl(3, F_SETFD, FD_CLOEXEC);
+
+ fexecve(3, args, NULL);
+ err(1, "fexecve()");
+}