summaryrefslogtreecommitdiffstats
path: root/runtime/staprun/relay.c
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2007-12-14 11:08:51 -0500
committerFrank Ch. Eigler <fche@elastic.org>2007-12-14 11:08:51 -0500
commit06e0853b32f53f33d791a99d21e630800642a442 (patch)
treed94038318e93302e360e2f855f77dc6b8eec1f3f /runtime/staprun/relay.c
parente9369426e1146a2373ac47c11647bdd70d41f7be (diff)
parent149eaccd1d42882b20471c4fdae07c32024cc654 (diff)
downloadsystemtap-steved-06e0853b32f53f33d791a99d21e630800642a442.tar.gz
systemtap-steved-06e0853b32f53f33d791a99d21e630800642a442.tar.xz
systemtap-steved-06e0853b32f53f33d791a99d21e630800642a442.zip
Merge branch 'master' of git://sources.redhat.com/git/systemtap
Diffstat (limited to 'runtime/staprun/relay.c')
-rw-r--r--runtime/staprun/relay.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/runtime/staprun/relay.c b/runtime/staprun/relay.c
index 538d027c..19621933 100644
--- a/runtime/staprun/relay.c
+++ b/runtime/staprun/relay.c
@@ -97,7 +97,6 @@ static void *reader_thread(void *data)
_perr("poll error");
return(NULL);
}
- stop_threads = 1;
}
while ((rc = read(relay_fd[cpu], buf, sizeof(buf))) > 0) {
if (write(out_fd[cpu], buf, rc) != rc) {
@@ -201,15 +200,17 @@ int init_relayfs(void)
out_fd[0] = STDOUT_FILENO;
}
- dbug(2, "starting threads\n");
- for (i = 0; i < ncpus; i++) {
- if (pthread_create(&reader[i], NULL, reader_thread,
- (void *)(long)i) < 0) {
- _perr("failed to create thread");
- return -1;
+ if (!load_only) {
+ dbug(2, "starting threads\n");
+ for (i = 0; i < ncpus; i++) {
+ if (pthread_create(&reader[i], NULL, reader_thread,
+ (void *)(long)i) < 0) {
+ _perr("failed to create thread");
+ return -1;
+ }
}
- }
-
+ }
+
return 0;
}