|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 662 (0x296) Types: TextFile Notes: R1k Text-file segment
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦b040f66dc⟧ └─⟦this⟧
#include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <errno.h> #include <fcntl.h> #include <signal.h> void BreakPipe() { printf("\rReader receive signal SIGPIPE \n"); } main(argc,argv) int argc; char *argv[]; { int fd; char car; signal(SIGPIPE,BreakPipe); printf("\rBegin Reader on pipe %s\n",argv[1]); setbuf(stdout,NULL); if ((fd=open(argv[1],O_RDONLY|O_SYNC,0)) == -1) { fprintf(stderr,"%s : ouverture impossible pipe %s errno = %d \n", argv[0],argv[1],errno); exit(1); } while (1) { if (read(fd,&car,1) > 0) printf("%c",car); else break; } printf("\rEnd Reader on pipe %s\n",argv[1]); }