LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   POSIX message queues(Solaris) to SYS V message queues(Linux) (http://www.linuxquestions.org/questions/programming-9/posix-message-queues-solaris-to-sys-v-message-queues-linux-132993/)

devershetty 01-09-2004 03:02 AM

POSIX message queues(Solaris) to SYS V message queues(Linux)
 
Hi there.

i m porting a solaris application to Linux and
i encountered appli using POSIX message queues ..
since right now linux dont support POSIX one.. I ended to port to SYSV messsage queues.
Here is breif complaint funcitons

Abstract Operations on a Message Queue
Operation POSIX Function SVR5 Function

Gain access to a queue,
creating it if it does not exist.
mq_open(3) msgget(2)

Query attributes of a queue and
number of pending messages.
mq_getattr(3) msgctl(2)

Change attributes of a queue.
mq_setattr(3) msgctl(2)

Give up access to a queue.
mq_close(3) n.a.

Remove a queue from the system.
mq_unlink(3), rm(1) msgctl(2), ipcrm(1)

Send a message to a queue.
mq_send(3) msgsnd(2)

Receive a message from a queue.
mq_receive(3) msgrcv(2)

Request asynchronous notification
of a message arriving at a queue.
mq_notify(3) n.a.



Problem is.

1. How can I port mq_close() to Linux sysv ?

2 Is there any way to check by sys call or command
that some process has access to queue before calling
msgctl( key, IPC_RMID, NULL)

-thanks
-Kotrappa.

richardash1981 01-22-2007 10:15 AM

A bit late no doubt, but this post still comes up on Google.
Since kernel 2.6.6 and Glibc 2.3.4 Linux has had POSIX message queue support, so the port wouldn't be necessary.


All times are GMT -5. The time now is 07:13 AM.