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
];
28 int stat_loc
, pipefd
[2];
38 for (i
= 0; i
< NUM_BLOCKS
; i
++)
39 if (read(pipefd
[0], buffer
, BLOCK_SIZE
) != BLOCK_SIZE
) break;
48 for (i
= 0; i
< NUM_BLOCKS
; i
++) write(pipefd
[1], buffer
, BLOCK_SIZE
);
53 return(-1); /* impossible */