Eric
Eric

Reputation: 24870

POSIX message queue - Does it still exists after reboot?

On linux, wrote a simple program to create a POSIX message queue, and send a msg to it, after the process terminated, it seems the msg is still there.

The questions are:

Upvotes: 4

Views: 1741

Answers (2)

user3159253
user3159253

Reputation: 17455

No it doesn't exist after reboot, since it resides on a virtual filesystem.

Upvotes: 3

Clifford
Clifford

Reputation: 93466

On Linux, message queues are mounted on a virtual file system, and the presence of a file does not imply that anything is written to physical media. This implementation is specific to Linux and not required POSIX behaviour.

The mq_overview man page describes the implementation.

Upvotes: 6

Related Questions