Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mq_unlink(2) [hpux man page]

mq_unlink(2)							System Calls Manual						      mq_unlink(2)

NAME
mq_unlink - unlink a message queue SYNOPSIS
DESCRIPTION
The system call disassociates the queue name, from a message queue specified by the argument, name. After a successful call to attempts to open a message queue with the same name will fail, if the flag is not set in oflags. If there are no processes with existing open descriptors for the message queue, the queue is destroyed. If one or more processes have the message queue open, the removal of the queue is postponed until all descriptors for the queue have been closed. To use this function, link in the realtime library by specifying on the compiler or linker command line. Security Restrictions Some or all of the actions associated with this system call are subject to compartmentalization restrictions. See compartments(5) for more information. Some or all of the actions associated with this system call require privileges. See privileges(5). RETURN VALUE
returns the following values: Successful completion. Failure, is set to indicate the error. ERRORS
If fails, is set to one of the following values: [EACCES] Permission to unlink the named message queue is denied. [EINVAL] The argument name is not a valid message queue name. [ENAMETOOLONG] The length of the name string exceeds bytes, or the length of a (pathname) component of the name string exceeds bytes while is in effect. [ENOENT] The named message queue does not exist. [ENOSYS] is not supported by the implementation. SEE ALSO
mq_open(2), mq_close(2), compartments(5), privileges(5). STANDARDS CONFORMANCE
mq_unlink(2)

Check Out this Related Man Page

MQ_UNLINK(3)						     Linux Programmer's Manual						      MQ_UNLINK(3)

NAME
mq_unlink - remove a message queue SYNOPSIS
#include <mqueue.h> int mq_unlink(const char *name); Link with -lrt. DESCRIPTION
mq_unlink() removes the specified message queue name. The message queue name is removed immediately. The queue itself is destroyed once any other processes that have the queue open close their descriptors referring to the queue. RETURN VALUE
On success mq_unlink() returns 0; on error, -1 is returned, with errno set to indicate the error. ERRORS
EACCES The caller does not have permission to unlink this message queue. ENAMETOOLONG name was too long. ENOENT There is no message queue with the given name. CONFORMING TO
POSIX.1-2001. SEE ALSO
mq_close(3), mq_getattr(3), mq_notify(3), mq_open(3), mq_receive(3), mq_send(3), mq_overview(7) COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2010-08-29 MQ_UNLINK(3)
Man Page

14 More Discussions You Might Find Interesting

1. Programming

a message queue question..

Hi there: Thanks first. When I use a message queue amony severl processes, will I have to synchronize the queue? I don't think I would have to because a message queue is implemented in a link listed. Correct me If I am wrong... (0 Replies)
Discussion started by: yanhu
0 Replies

2. Shell Programming and Scripting

queue is disabled

Does anyone know why I got this message when I tried to print my file on Unix? THANK YOU! (1 Reply)
Discussion started by: whatisthis
1 Replies

3. Programming

Deleting ALL message queue

hi all, I'm working on this problem for 2 days. Can somebody tell me that how to delete all message queues from the system ? Since "ipcs -q" gives the list of all existing message queue, then there must be a system call and data stucture where from I can fetch the data about all existing... (2 Replies)
Discussion started by: v_rathor
2 Replies

4. IP Networking

hi friends

i have been in trouble please help me out i have developed a message queue.it is a simple message queue program after running it give error like NO SPACE LEFT ON DEVICE what is this error how could i solve this problem i am working on solaris9.2 (2 Replies)
Discussion started by: ramneek
2 Replies

5. IP Networking

message queue problem

I am sending and retriving the message to the queue the problem is after retrieving the message can i see what is there in my message queue. (actually in my application i am encountring some garbage value) so i want to retieve this garbage value and also want to know its size how... (0 Replies)
Discussion started by: ramneek
0 Replies

6. Programming

regarding socket & mssage queue

hello , I have to write an application in which I had to implement both Socket Comminication and IPC- message queues. and that process should run in Infinite loop as well I had to continously check and send data through both type of communications... What should I use to implement it... I had... (34 Replies)
Discussion started by: arunchaudhary19
34 Replies

7. Linux

dnssubmit queue overload error message

my squid running on openBSD 4.1 i have dns_childern 32 but i m facing a problem of queue overloading cache.log shows this error message... dnsSubmit: queue overload, rejecting xxxxxxxxxx dnsSubmit: queue overload, rejecting xxxxxxxxxx dnsSubmit: queue overload, rejecting xxxxxxxxxx... (0 Replies)
Discussion started by: anil.pilani
0 Replies

8. UNIX for Dummies Questions & Answers

Sending a structure through a message queue

Hi, I browsed thru the previous posts and couldnt find a solution for my problem. Hence I decided to post it. I have a buffer array that I want to send thru a message queue. The array consists of a header structure and a payload structure memcopied to it. When I print the contents of the... (1 Reply)
Discussion started by: zeebie
1 Replies

9. AIX

How to display IPC limit on AIX?

Such as how to display these: number of message queue IDs : 4,096 bytes per message : 8,192 bytes per message queue : 65,536 messages per message queue : 8,192 (4 Replies)
Discussion started by: rainbow_bean
4 Replies

10. Programming

Permission denied when creating message queue

Hi guys. i have wrote a simple program to test message queue attributes. here it is: #include <stdio.h> #include <stdlib.h> #include <mqueue.h> #include <fcntl.h> #include <string.h> #include <errno.h> #include <sys/stat.h> int main() { struct mq_attr attr; mqd_t mqd; ... (2 Replies)
Discussion started by: majid.merkava
2 Replies

11. Programming

creating a message queue using mq_open

Hi all, First of all thanks in advance for reading my post and for your heart for helping me. I am trying to create a message queue using mq_open(name,oflags,mode_t,attr) method. But that function call is returning with an error code EFAULT. By googling it I found that it happens when there is... (10 Replies)
Discussion started by: parusasi
10 Replies

12. Programming

msgget message queue always get permission denied

I want to use msgget() to obtain a message queue between two processes, here is my code: the first one create the mq, the second one open it and add a message to it. But when I execute the second one, I get permission denied. I've already desperately tried everything I can think of to solve this... (2 Replies)
Discussion started by: tefino
2 Replies

13. Shell Programming and Scripting

Scan a file in realtime and execute certain commands on encountering 5 consecutive identical lines

Mysql log has something like below: I need a bash shell script that will do the following: 1) The script will scan the mysql.log file constantly in real time (something like tail -F mysql.log) 2) If it encounters 5 consecutive identical lines then it would invoke some commands (say... (4 Replies)
Discussion started by: proactiveaditya
4 Replies

14. Programming

Function open() sets errno

I am opening a text file using open() system call in O_RDONLY mode. open() returns me a valid handler but also sets errno to 13 i.e. EACCES(Permission denied). Question is when open() is returning a valid handler then why does it sets the errno? Should not errno be set only in case of error... (10 Replies)
Discussion started by: rupeshkp728
10 Replies