unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (HP-UX-11.11)
Page:
Section:
Apropos / Subsearch:
optional field



 mq_unlink(2)							mq_unlink(2)




 NAME
      mq_unlink - unlink a message queue

 SYNOPSIS
      #include <&lt&lt&lt;sys/mqueue.h>&gt&gt&gt;

      int mq_unlink(const char *name);

 DESCRIPTION
      The mq_unlink() system call disassociates the queue name, from a
      message queue specified by the argument, name.  After a successful
      call to mq_unlink(), attempts to open a message queue with the same
      name will fail, if the flag O_CREAT 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.

 RETURN VALUE
      mq_unlink() returns the following values:

	   0	Successful completion.

	   -1	Failure, errno is set to indicate the error.

 ERRORS
      If mq_unlink() fails, errno 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 PATH_MAX
			  bytes, or the length of a (pathname) component of
			  the name string exceeds NAME_MAX bytes while
			  _POSIX_NO_TRUNC is in effect.

	   [ENOENT]	  The named message queue does not exist.

	   [ENOSYS]	  mq_unlink() is not supported by the
			  implementation.

 SEE ALSO
      mq_open(2), mq_close(2).

 STANDARDS CONFORMANCE
      mq_unlink(): POSIX 1003.1b




 Hewlett-Packard Company	    - 1 -   HP-UX Release 11i: November 2000