diff options
author | hunt <hunt> | 2007-05-07 20:08:32 +0000 |
---|---|---|
committer | hunt <hunt> | 2007-05-07 20:08:32 +0000 |
commit | ff3e10e0e01911305efebb3459189ca9321bd54d (patch) | |
tree | 6e0d7e7278ebf8ec2595fb4e89fc1539f1c188c9 /runtime/staprun/relay.c | |
parent | e41dec42de3cf3881c0c5ba79a4938c9158b041f (diff) | |
download | systemtap-steved-ff3e10e0e01911305efebb3459189ca9321bd54d.tar.gz systemtap-steved-ff3e10e0e01911305efebb3459189ca9321bd54d.tar.xz systemtap-steved-ff3e10e0e01911305efebb3459189ca9321bd54d.zip |
2007-05-07 Martin Hunt <hunt@redhat.com>
Patch from David Smith
* mainloop.c (stp_main_loop): Properly handle write()
return value. Fixes build problem with some compilers.
Diffstat (limited to 'runtime/staprun/relay.c')
-rw-r--r-- | runtime/staprun/relay.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/staprun/relay.c b/runtime/staprun/relay.c index 5015cbef..82c5ccc4 100644 --- a/runtime/staprun/relay.c +++ b/runtime/staprun/relay.c @@ -64,7 +64,7 @@ static void *reader_thread(void *data) if (rc > max_rd) max_rd = rc; - if (write(out_fd[cpu], buf, rc) < 0) { + if (write(out_fd[cpu], buf, rc) != rc) { fprintf(stderr, "Couldn't write to output fd %d for cpu %d, exiting: errcode = %d: %s\n", out_fd[cpu], cpu, errno, strerror(errno)); pthread_exit(NULL); |