Good afternoon...
I do my homework, which says that I have 5 processes; server, and the rest are clients. Each process must be called from a different executable file . I'm going to implement a two-way messaging solution, but the question is not about sending messages as such. Is there an elegant way to transfer a key between these various executables. those. when i call the following function:
int msgget(key_t key, int msgflg);
How should other processes know the key?
It is normal for my homework to use a predefined key, but I would like to know how this can be done in a real program. Since "I understand," a conflict may occur if an unrelated process requests my key on any user machine.
source share