So my task is to communicate between 3 processes using signals and named pipes. It has to work like that for example : I want to close all programs and free resources of all processes, to do that I send SIGUSR1 to process B(for example), that process saves data in pipe about what I want to do, sends signal to other 2 processes, they read pipe and depending of what was written in pipe they either close, stop communication between each other or continue communication (using msg queues).
My issue is that I could just make 6 pipes between them so each pipe has one reader and one writer like 1-2 2-1,1-3,3-1 etc. but that would require a lot of work so I was wondering if there would be any simpler solution to that problem.
I wanted to use one pipe and open it as read write in all processes although I realised that one pipe can have one writer and reader.
Does anyone have any simplier solution to that problem?