DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T s

⟦20d1fafc8⟧ TextFile

    Length: 648 (0x288)
    Types: TextFile
    Names: »saxer6.c«

Derivation

└─⟦db229ac7e⟧ Bits:30007240 EUUGD20: SSBA 1.2 / AFW Benchmarks
    └─⟦this⟧ »EUUGD20/AFUU-ssba1.21/ssba1.21E/saxer/saxer6.c« 
    └─⟦this⟧ »EUUGD20/AFUU-ssba1.21/ssba1.21F/saxer/saxer6.c« 

TextFile

/* Program #6       John Saxer
                    pipes */
 
#include <stdio.h>
#ifndef BSIZE
#         define BSIZE BUFSIZ
#endif
 
main()
{
          register int i;
          int fd[2];
          char buf[BSIZE];
 
          *buf='1';
          pipe(fd);
          if ( ( i=fork() ) == -1 )
                    exit(1);
          if ( i == 0 )
          {
                    close(fd[0]);
                    for ( ; i<2000 ; i++ )
                              write(fd[1],buf,sizeof(buf));
          }
          else
          {
                    close(fd[1]);
                    while ( read(fd[0],buf,sizeof(buf)) != 0 );
          }
}