Skip to content

Tag: message-queue

Design of multi-threaded server in c

When trying to implement a simple echo server with concurrent support on linux. Following approaches are used: Use pthread functions to create a pool of thread, and maintained in a linked list. It’s created on process start, and destroy on process termination. Main thread will accept request, and use a …

Message queue: msgsnd failed : Invalid argument

Can anyone please help me to point out as what is the error in my program? Thanks in advance, kingsmasher1 Output: msgsnd failed: Invalid argument Answer You do not have enough space in your buf.mtext (15 characters) for “This is a test message” (23 characters plust one more for a NUL terminator).…