An exercise in Stevens' "Unix Network Programming" says: "Write a program that copies standard input to standard output using the select system call". I've made a start on this: the code below waits for a user to enter something on standard input, and then delivers the "something" to standard output: but surely more is involved in this exercise? Any advice will be greatly appreciated.
main(int argc, char *argv)
if (select(1, &fdvar, (fd_set *)0, (fd_set *)0, NULL) == 1)
printf("Input about to be copied to output!\n");