I have a problem about communication between child processes of the same process father.
- A father process create N child processes.
- Each child process have an ID.
- ID of the first child is N, the second is (N-1),... and the last is (1):
process i could continue to work only after it receives a signal SIGRTMIN from the process j= i-1 (brother left).
process i could finish only after it receives a signal SIGRTMIN+1 from the process j = i+1 >(brother right).
father process could finish only after all of its children finish.
The question is: without using IPC(queue of message, shared memory, semaphore) or IO (socket, tube, pipe, files), how a process know the process id of its brother left and the process id of its brother right.
For the question of brother left,
I use an array of process ID. More clearly, in the father process, an array will keep process ids of each child it creates, when the process is created, it knows the process id of process i-1 (process have ID = N-i+1).
But I don't know how to get process id of process i+1 (brother right).