i am sure that the father only sends one message.
I have a infinite cycle in child in which it i read from pipe, and type out number of read bytes and the message.
in the 1st cycle it prints correct number of bytes and message.
But then it starts repeating itself. it says 0 bytes read, and the variable in which the message should go remains the same.
Canīt understand why...
Just so you can check the code: (msg is a struct)
Code:
write(fdclient[WRITE],&msg,sizeof(msg));
Code:
read((int)fdclient,&msg,sizeof(msg))