From ff3e10e0e01911305efebb3459189ca9321bd54d Mon Sep 17 00:00:00 2001 From: hunt Date: Mon, 7 May 2007 20:08:32 +0000 Subject: 2007-05-07 Martin Hunt Patch from David Smith * mainloop.c (stp_main_loop): Properly handle write() return value. Fixes build problem with some compilers. --- runtime/staprun/relay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/staprun/relay.c') 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); -- cgit