An open API service indexing awesome lists of open source software.

https://github.com/jonrohan/multicommunicate

The purpose of this project is to introduce you to multitasking and interprocess communication using pipes on Unix.
https://github.com/jonrohan/multicommunicate

Last synced: 7 months ago
JSON representation

The purpose of this project is to introduce you to multitasking and interprocess communication using pipes on Unix.

Awesome Lists containing this project

README

          

# Multitasking and Communication Using Pipes

## Description of logic:
The program has the task of creating two child processes and sending a message to each child process. The user can specify any number of messages to send to each processes, but no more than 10. To accomplish this I created the two child processes first then I asked the user for the messages. To accommodate the multiple messages I put a for loop around each process and each process will repeat for the number of times the user input.

## Errors:
I had a problem, at first, was inputting the message. Using fgets command leaves a newline character at the end of the string. I read how to fix this in my Unix/C book and it told me to write the getline function.

I was also unable to get my output to display a β€œ quotation mark like in the sample output you gave us on the sheet.

i.e.

P1 sending message #1 (β€œone”) to P2