#include <unistd.h>
int main() {
  int fd[2];
  pipe(fd);
  close(0);
  dup(fd[0]);
  fork() || execl("/usr/bin/less", "", 0);
  write(fd[1], "hoge\nfuga\npiyo\n", 15);
  return 0;
}