summaryrefslogtreecommitdiffstats
path: root/runtime/staprun/relay.c
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2007-10-10 13:58:43 -0400
committerFrank Ch. Eigler <fche@elastic.org>2007-10-10 13:58:43 -0400
commit36c24cdba10c3d20638c78b52cc8e327a3a0b82d (patch)
tree24cbeb006365fdaa21dbf9cf3b44eae055684123 /runtime/staprun/relay.c
parent38d7fc30b108ec4a9e74ddb33d945cce1bd5c4c6 (diff)
parentd319669c3f77a3e451f1cad845471433e6d0dbfa (diff)
downloadsystemtap-steved-36c24cdba10c3d20638c78b52cc8e327a3a0b82d.tar.gz
systemtap-steved-36c24cdba10c3d20638c78b52cc8e327a3a0b82d.tar.xz
systemtap-steved-36c24cdba10c3d20638c78b52cc8e327a3a0b82d.zip
Merge branch 'master' of git://sources.redhat.com/git/systemtap
Diffstat (limited to 'runtime/staprun/relay.c')
-rw-r--r--runtime/staprun/relay.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/runtime/staprun/relay.c b/runtime/staprun/relay.c
index 30c4ce1e..538d027c 100644
--- a/runtime/staprun/relay.c
+++ b/runtime/staprun/relay.c
@@ -148,7 +148,7 @@ int init_relayfs(void)
return -1;
dbug(2, "attempting to open %s\n", buf);
relay_fd[i] = open(buf, O_RDONLY | O_NONBLOCK);
- if (relay_fd[i] < 0)
+ if (relay_fd[i] < 0 || set_clexec(relay_fd[i]) < 0)
break;
}
ncpus = i;
@@ -184,6 +184,8 @@ int init_relayfs(void)
perr("Couldn't open output file %s", buf);
return -1;
}
+ if (set_clexec(out_fd[i]) < 0)
+ return -1;
}
} else {
/* stream mode */
@@ -193,6 +195,8 @@ int init_relayfs(void)
perr("Couldn't open output file %s", outfile_name);
return -1;
}
+ if (set_clexec(out_fd[i]) < 0)
+ return -1;
} else
out_fd[0] = STDOUT_FILENO;