<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>EmbLogic &#187; Meenakshi Bhardwaj</title>
	<atom:link href="https://www.emblogic.com/blog/author/meenakshi_bhardwaj/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.emblogic.com/blog</link>
	<description>Embedded System and ARM Training</description>
	<lastBuildDate>Tue, 03 Mar 2020 13:00:06 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.1</generator>
	<item>
		<title>How to create Message Queue</title>
		<link>https://www.emblogic.com/blog/12/how-to-create-message-queue/</link>
		<comments>https://www.emblogic.com/blog/12/how-to-create-message-queue/#comments</comments>
		<pubDate>Fri, 09 Dec 2016 12:36:01 +0000</pubDate>
		<dc:creator><![CDATA[Meenakshi Bhardwaj]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13756</guid>
		<description><![CDATA[The msgget() system call returns the System message queue identifier associated with the value of the key argument. A new message queue is created if key has the value  IPC_PRIVATE or key isn&#8217;t IPC_PRIVATE, no message queue with the given &#8230; <a href="https://www.emblogic.com/blog/12/how-to-create-message-queue/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>The <strong>msgget()</strong> system call returns the System message queue identifier associated with the value of the key argument. A new message queue is created if key has the value  <strong>IPC_PRIVATE</strong> or key isn&#8217;t IPC_PRIVATE, no message queue with the given key exists, and  <strong>IPC_CREAT</strong> is specified in msgflg. If msgflg specifies both <strong>IPC_CREAT and IPC_EXCL</strong> and a message queue already exists for key, then <strong>msgget()</strong> fails with errno set to <strong>EEXIST</strong>. This is analogous to the effect of the combination O_CREAT | O_EXCL for open.</p>
<p>These header files are used:</p>
<ul>
<li>#include &lt;sys/types.h&gt;</li>
<li>#include &lt;sys/ipc.h&gt;</li>
<li>#include &lt;sys/msg.h&gt;</li>
</ul>
<p><strong>Syntax: </strong>int msgget(key_t key, int msgflg);</p>
<p><strong>RETURN VALUE</strong>: If successful, the return value will be the message queue identifier (a nonnegative integer), otherwise -1 with errno indicating the error.</p>
<p><strong>ERRORS</strong>: On failure, errno is set to one of the following values which are given below:</p>
<ul>
<li><strong>EACCES</strong>: A message queue exists for key, but the calling process does not have  permission  to  access  the  queue,  and does not have the CAP_IPC_OWNER capability.</li>
<li><strong>EEXIST</strong>: A message  queue  exists  for  key  and  msgflg  specified  both IPC_CREAT and IPC_EXCL.</li>
<li><strong>ENOENT</strong>: No  message  queue  exists  for  key  and msgflg did not specify IPC_CREAT.</li>
<li><strong>ENOMEM</strong>: A message queue has to be created but the system does  not  have enough memory for the new data structure.</li>
<li><strong>ENOSPC</strong>: A  message  queue has to be created but the system limit for the maximum number of message queues (MSGMNI) would be exceeded.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/12/how-to-create-message-queue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
