summaryrefslogtreecommitdiffstats
path: root/runfd.c
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2016-11-04 14:02:37 +0100
committerMarius Halden <marius.h@lden.org>2016-11-04 14:02:37 +0100
commit40cf0121601f69a4f5c491ab1e2fd54bd7fe4b75 (patch)
tree0119b3b7b5c55aa81dbbed459ebc317a4d3c41cc /runfd.c
parentd7b994eccb760a68315fc48b1600f9164282a127 (diff)
downloadrunq-40cf0121601f69a4f5c491ab1e2fd54bd7fe4b75.tar.gz
runq-40cf0121601f69a4f5c491ab1e2fd54bd7fe4b75.tar.bz2
runq-40cf0121601f69a4f5c491ab1e2fd54bd7fe4b75.tar.xz
Initial for executing filedescriptor
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()");
+}