/** Named pipe used to communicate with process2 */
char * read_pipe = "/tmp/process2pipe";
+ /** Descriptor of input pipe */
int read_descriptor;
-
+
+ /** Buffer used for storing data from input pipe */
int buffer = 0;
- int i = 0;
+ /** Stores number of bytes read from input pipe in current iteration */
ssize_t count = 0;
/* Reading from process2 */
read_descriptor = open(read_pipe, O_RDONLY);
- int number_of_characters = 0;
-
while(1) {
/* Read data from input pipe */
count = read(read_descriptor, &buffer, sizeof(int));