home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 446.lha / Popen / cat.c < prev    next >
C/C++ Source or Header  |  1990-12-06  |  314b  |  18 lines

  1. /*
  2. **  This is a real dumb program written to test the "w" form of popen.
  3. **  it just echoes stdin to stdout and exits with a strange value to
  4. **  see that pclose gets the correct exit status
  5. */
  6.  
  7. #include <stdio.h>
  8. #include <stdlib.h>
  9.  
  10. main()
  11. {
  12.     int    ch;
  13.  
  14.     while ((ch = getchar()) > 0)
  15.         putchar(ch);
  16.     exit(122);
  17. }
  18.