I need to write a simple function which does the following in linux:
- Create two processes.
- Have thread1 in Process1 do some small operation, and send a message to Process2 via thread2 once operation is completed. *Process2 shall acknowledge the received message.
I have no idea where to begin
- I have written two simple functions which simply count from 0 to 1000 in a loop (the loop is run in a function called by a thread) and I have compiled them to get the binaries.
- I am executing these one after the other (both running in the background) from a shell script
- Once process1 reaches 1000 in its loop, I want the first process to send a "Complete" message to the other.
I am not sure if my approach is correct on the process front and I have absolutely no idea how to communicate between these two. Any help will be appreciated.
LostinSpace