persistence - Making message queues non-persistent in Linux -



persistence - Making message queues non-persistent in Linux -

this may newbie question message queues, having issues them beingness persistent across linux system. running fedora 14 , using message queues pass info , threads.

the problem create message queue:

q = mq_open (strname, o_rdwr | o_creat | o_nonblock, 0666, &sqattr)

where:

strname = "/info_upd_q" or "/poll_q" ... sqattr.mq_flags = 0; sqattr.mq_maxmsg = imaxnummessages; /* 1 - 10 */ sqattr.mq_msgsize = iszofmessages; sqattr.mq_curmsgs = 0;

the issue having alter size of messages passed or app crashes/exits/aborts , queues have not been closed , emptied, next run of programme floods scheme old messages or not open correctly , info not threads.

at moment solving issue changing name of queues , rebooting scheme every often.

how queues stop doing this?

thanks.

from shell can see existing queues using:

# ipcs -q

and can remove stale queues:

# ipcrm -q msqid

the msqid available output of first command.

linux persistence message-queue

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -