|
|
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 - metrics - download
Length: 677 (0x2a5)
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«
└─⟦24ad3512c⟧
└─⟦this⟧
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <fcntl.h>
#include <signal.h>
void BreakPipe()
{
printf("\rWriter receive signal SIGPIPE \n");
}
main(argc,argv)
int argc;
char *argv[];
{
int fd;
char car;
signal(SIGPIPE,BreakPipe);
printf("\rBegin Writer on pipe %s\n",argv[1]);
if ((fd=open(argv[1],O_WRONLY|O_SYNC,0)) == -1)
{
fprintf(stderr,"%s : ouverture impossible pipe %s errno = %d \n",
argv[0],argv[1],errno);
exit(1);
}
system("stty raw");
while (1)
{
car=getchar();
if (write(fd,&car,1) <= 0)
break;
}
system("stty -raw");
printf("\rEnd Writer on pipe %s\n",argv[1]);
}