source: nanoscale/trunk/mycat.c @ 4584

Last change on this file since 4584 was 409, checked in by kennell, 18 years ago

Added nanoscale for visualization server load distribution.

File size: 396 bytes
Line 
1#include <stdio.h>
2#include <unistd.h>
3
4int main()
5{
6  int status;
7  char buffer[100];
8  while(1) {
9    status = read(0, buffer, sizeof(buffer));
10    if (status <= 0) {
11      return 0;
12    }
13    status = write(1, buffer, status);
14    if (status < 0) {
15      perror("mycat write");
16      return 1;
17    }
18
19    float value = status;
20    status = write(3, &value, sizeof(value));
21  }
22
23  return 0;
24}
25
Note: See TracBrowser for help on using the repository browser.