I'm trying to use message queue to send and receive messages between father and son processes, I used enum to set message types for msgrcv but it seems that it ignores that information:
enum children {
e_father_child1 = 1,
e_father_child2 = 2,
e_child1_father = 10,
e_child2_father = 20
};
and the command is:
queue_indc = msgrcv (msgid, &msg, sizeof (msg.m_data), e_child1_father, 0);
It works if I change the argument from enum type to int but I was wondering why isn't it working as enum and is there any other way to make it work.
Thanks in advance!