summaryrefslogtreecommitdiffstats
path: root/runtime/stpd/librelay.c
diff options
context:
space:
mode:
authorhunt <hunt>2005-08-19 16:41:47 +0000
committerhunt <hunt>2005-08-19 16:41:47 +0000
commitd1b5c3064d3932a23bf2eb0ae01555ed8b901255 (patch)
tree86424c62b22e3759b86d2ff452f2215641e1d34d /runtime/stpd/librelay.c
parent0aaf677efbf70fd173d241c01632b4eacc8226e5 (diff)
downloadsystemtap-steved-d1b5c3064d3932a23bf2eb0ae01555ed8b901255.tar.gz
systemtap-steved-d1b5c3064d3932a23bf2eb0ae01555ed8b901255.tar.xz
systemtap-steved-d1b5c3064d3932a23bf2eb0ae01555ed8b901255.zip
2005-08-19 Martin Hunt <hunt@redhat.com>
* librelay.c (reader_thread): Check the return value for write().
Diffstat (limited to 'runtime/stpd/librelay.c')
-rw-r--r--runtime/stpd/librelay.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/stpd/librelay.c b/runtime/stpd/librelay.c
index 6bceb99f..9dc52f25 100644
--- a/runtime/stpd/librelay.c
+++ b/runtime/stpd/librelay.c
@@ -359,7 +359,8 @@ static void *reader_thread(void *data)
status[cpu].info.consumed += subbufs_consumed;
consumed_info.cpu = cpu;
consumed_info.consumed = subbufs_consumed;
- write (proc_file[cpu], &consumed_info, sizeof(struct consumed_info));
+ if (write (proc_file[cpu], &consumed_info, sizeof(struct consumed_info)) < 0)
+ fprintf(stderr,"WARNING: writing consumed info failed.\n");
}
} while (1);
}