ipc problem
hello
i have a problem using ipc-message-queues. if i put this into my code: if ((msgrcv(msgid,message,60,0,MSG_NOERROR))<0) then reading of the message causes the program to exit (error message: bad address) does the message has to have a special type? the client sends a message with type: char *message; ist this OK? then what is the problem? i can initialise the queue, no problems there, everything seems to work, the client sends the message coorectly (or at least it seems so), but the server cannot read the message from the queue. any help is welcome raven |
I'm not sure exactly what your code looks like, so I'm unable to give you a better clue of what is wrong. I can provide you with a simple example that works:
Hope this helps. Code:
#include <sys/types.h> |
I forgot to mention some commands that can be helpful when dealing with shared mem, semaphores and queues.
Code:
ipcs |
thank you it works now fine.
the problem was i sent a plaintext message to the server and no struct... thanks anyway raven |
All times are GMT -5. The time now is 11:45 PM. |