i have a program (A) that calculates some stuff and then writes it into a log file.
Now i have to code another program (B) that has to work with A's data.
Since the log file will be edited by A almost all the time i don't think its a good idea to let B check if the log file changed and get the data from there.
So i my idea is:
A writes the data to the log file and notifies B that there are new data to work with and then let A send the data directly to B.
Since i never coded something like this before my question is:
Is it possible for 2 independent processes to communicate somehow
and if yes, how is the best way to do it?
FIFO can be used here because its simply two processes communicating...its a named pipe in which processes act as producer/consumer. there are some advanced IPC mechanisms as well but i don't think u required them here. however u can use them for ur skill enhancement.