third_party/webports/src/src/ports/devenv/tests/devenv_small_test.cc
static int pipes_child(int argc, char **argv) {
  char buffer[200];
  for (;;) {
    int len = read(0, buffer, sizeof(buffer));
    if (len <= 0) {
      break;
    }
    write(1, buffer, len);
  }
  close(1);
  close(0);
  return 0;
}
// Used in main to allow the test exectuable to be started
// as an echo server.
// Child takes args:
// ./test pipes
Used in main to allow the test exectuable to be started
as an echo server.
Child takes args:
./test pipes
Used in main to allow the test exectuable to be started as an echo server . Child takes args : . / test pipes
static int pipes_child(int argc, char **argv) {
  char buffer[200];
  for (;;) {
    int len = read(0, buffer, sizeof(buffer));
    if (len <= 0) {
      break;
    }
    write(1, buffer, len);
  }
  close(1);
  close(0);
  return 0;
}
static int pipes_child ( int argc , char * * argv ) { char buffer [ 200 ] ; for ( ; ; ) { int len = read ( 0 , buffer , sizeof ( buffer ) ) ; if ( len <= 0 ) { break ; } write ( 1 , buffer , len ) ; } close ( 1 ) ; close ( 0 ) ; return 0 ; }
Used in main to allow the test exectuable to be started
as an echo server.
Used in main to allow the test exectuable to be started as an echo server .