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.
- Host: GitHub
- URL: https://github.com/jonrohan/multicommunicate
- Owner: jonrohan
- Created: 2012-09-15T20:52:53.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2012-09-16T03:09:23.000Z (almost 14 years ago)
- Last Synced: 2025-01-14T03:48:05.058Z (over 1 year ago)
- Language: C
- Size: 99.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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