utrace: Sort syscalls by number of invocations
[project/procd.git] / rcS.c
diff --git a/rcS.c b/rcS.c
index 913fc9a..b1202bf 100644 (file)
--- a/rcS.c
+++ b/rcS.c
@@ -24,6 +24,7 @@
 
 #include <sys/types.h>
 #include <sys/stat.h>
 
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <fcntl.h>
 #include <glob.h>
 
 #include <libubox/ustream.h>
 #include <glob.h>
 
 #include <libubox/ustream.h>
@@ -81,6 +82,7 @@ static void q_initd_run(struct runqueue *q, struct runqueue_task *t)
 
        if (pid) {
                close(pipefd[1]);
 
        if (pid) {
                close(pipefd[1]);
+               fcntl(pipefd[0], F_SETFD, FD_CLOEXEC);
                s->fd.stream.string_data = true,
                s->fd.stream.notify_read = pipe_cb,
                runqueue_process_add(q, &s->proc, pid);
                s->fd.stream.string_data = true,
                s->fd.stream.notify_read = pipe_cb,
                runqueue_process_add(q, &s->proc, pid);