3 /* File: pipes.c - created by Marty Leisner */
4 /* Leisner.Henr 1-Dec-87 8:55:04 */
6 /* Copyright (C) 1987 by Martin Leisner. All rights reserved. */
7 /* Used by permission. */
15 #define BLOCK_SIZE 1000
16 #define NUM_BLOCKS 1000
18 char buffer
[BLOCK_SIZE
];
29 int stat_loc
, pipefd
[2];
39 for (i
= 0; i
< NUM_BLOCKS
; i
++)
40 if (read(pipefd
[0], buffer
, BLOCK_SIZE
) != BLOCK_SIZE
) break;
49 for (i
= 0; i
< NUM_BLOCKS
; i
++) write(pipefd
[1], buffer
, BLOCK_SIZE
);
54 return(-1); /* impossible */