applications sharing states

If you have multiple applications that need to 'talk' to each other. What do you do or what do you use?

For example lets say I have an application that monitors a mnt location for changes/edits etc.. I have a second application that uses usb and can transmit files from the previously mentioned mnt location. I need both applications to update each other on a mnt disconnecting or a file that is being read so the mnt location is not released and so on - what would be the best means to allow these applications to pass each others current state or pending state?

I've considered a file that is used to pass messages to each other but that seems slow with all the read/writes and waiting if both try to read/write at the same time. Ideally something that is lightweight and can be easily cross-compiled would be great but im not sure what that would be.

Would or could a bash exported variable be the way to go? Is this possible?

Would love to hear your thoughts or experience on this.
Thanks
This is generally called Inter Process Communication

There's a whole page about it, listing a bunch of methods: https://en.wikipedia.org/wiki/Inter-process_communication
Thank you!

Mkfifio seems to be the way to go.
Topic archived. No new replies allowed.