📄 linux环境进程间通信(三):消息队列.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0070)http://www-900.ibm.com/developerWorks/cn/linux/l-ipc/part3/index.shtml -->
<HTML><HEAD><TITLE>Linux环境进程间通信(三):消息队列</TITLE>
<META content=Linux环境进程间通信(三):消息队列 name=TITLE>
<META content=Linux name=zone><!-- Linux-->
<META
content="Linux, process, communication, IPC, 信号, Unix, Linux IPC, 通信, 消息队列, 郑彦兴"
name=KEYWORDS>
<META content="本系列文章中的前两部分,我们探讨管道及信号两种通信机制,本文将深入第三部分,介绍系统 V 消息队列及其相应 API。"
name=ABSTRACT>
<META content="本系列文章中的前两部分,我们探讨管道及信号两种通信机制,本文将深入第三部分,介绍系统 V 消息队列及其相应 API。"
name=DESCRIPTION>
<META content=2003-1-13 name=DC.DATE scheme="iso8601">
<META content=2003-1-13 name=LASTUPDATE><!--- common meta part for all zones -->
<META content=papers_html name=dWCategory>
<META content=/developerWorks/cn/cncontent.nsf/cn_dW_feedback name=OWNER>
<META content=V11 name=source>
<META content=GB2312 name=charset>
<META content=zh-cn name=DC.LANGUAGE scheme="rfc1766">
<META content=cn name=IBM.COUNTRY>
<META content=Public name=SECURITY>
<META content=text/xhtml name=FORMAT>
<META content="Copyright (c) 2002 by IBM Corporation" name=COPYRIGHT>
<META content=index,follow name=ROBOTS>
<META name=DOCUMENTCOUNTRYCODE value="us">
<META name=DOCUMENTLANGUAGECODE value="en">
<META
content='(PICS-1.1 "http://www.rsac.org/ratingsv01.html" l gen true comment "RSACi North America Server" by "webmaster@mail.software.ibm.com" for "http://www.ibm.com/software" on "1997.08.13T17:59-0800" r (n 0 s 0 v 0 l 0))'
http-equiv=PICS-Label>
<META content="text/html; charset=GB2312" http-equiv=Content-Type>
<META content=0 http-equiv=Expires>
<SCRIPT language=JavaScript src="Linux环境进程间通信(三):消息队列.files/style.js"
type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="Linux环境进程间通信(三):消息队列.files/spinbox.js"
type=text/javascript></SCRIPT>
<META content="MSHTML 5.00.3700.6699" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff leftMargin=2 topMargin=2 marginwidth="2" marginheight="2"><!-- MASTHEAD-->
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR>
<TD class=tbgc width=160><A
href="http://www-900.ibm.com/developerWorks/cn/cgi-bin/click.cgi?url=www.ibm.com/cn/&origin=dwheader"><IMG
alt=IBM border=0 height=47 src="Linux环境进程间通信(三):消息队列.files/ibm-logo.gif"
width=160></A></TD>
<TD class=tbg width=70><FONT color=#99ccff size=2><B>China</B></FONT><A
href="http://www-900.ibm.com/developerWorks/cn/linux/l-ipc/part3/index.shtml#main"><IMG
alt="Skip to main content" border=0 height=1
src="Linux环境进程间通信(三):消息队列.files/c.gif" width=70></A></TD>
<TD align=right class=tbgc vAlign=top width="100%">
<TABLE border=0 cellPadding=0 cellSpacing=0>
<FORM action=http://www-106.ibm.com/search/searchResults.jsp id=form1
method=get name=form1>
<TBODY>
<TR>
<TD colSpan=7><IMG alt="" border=0 height=4
src="Linux环境进程间通信(三):消息队列.files/c.gif" width=390></TD></TR>
<TR vAlign=center>
<TD class=dwsearch><NOBR><FONT
color=#ffffff><B>搜索:</B></FONT></NOBR> </TD>
<TD><INPUT class=dwsearch maxLength=100 name=query size=23></TD>
<TD class=dwsearch vAlign=center> <FONT
color=#ffffff><B>在</B></FONT> </TD>
<TD class=dwsearch><SELECT class=dwsearch2
name=searchScope> <OPTION selected value=dW>dW
全部内容</OPTION> <OPTION value=javaZ> Java 技术</OPTION> <OPTION
value=linuxZ> Linux</OPTION> <OPTION
value=opensrcZ> 开放源码</OPTION> <OPTION
value=securityZ> 安全</OPTION> <OPTION value=webservZ> Web
服务</OPTION> <OPTION value=xmlZ> XML</OPTION> <OPTION
value=dW>.................</OPTION> <OPTION
value=dmdd> DB2</OPTION> <OPTION
value=wsdd> WebSphere</OPTION> <OPTION
value=lotusdd> Lotus 专题</OPTION> <OPTION
value=tivolidd> Tivoli 专题</OPTION> <OPTION
value=dW>.................</OPTION> <OPTION value=all>IBM
全部内容</OPTION></SELECT></TD>
<TD><IMG alt="" border=0 height=1
src="Linux环境进程间通信(三):消息队列.files/c.gif" width=5></TD>
<TD><INPUT alt="Search button" border=0 height=23 name=Search
src="Linux环境进程间通信(三):消息队列.files/search.gif" type=image value=Search
width=64></TD>
<TD vAlign=top><IMG alt="" border=0 height=1
src="Linux环境进程间通信(三):消息队列.files/c.gif" width=30></TD></TR>
<TR vAlign=top>
<TD> </TD>
<TD class=dwsearch> <FONT color=#ffffff>只用 + - " "
( )</FONT>
<TD> </TD>
<TD> </TD>
<TD> </TD>
<TD> </TD>
<TD> </TD></TR><INPUT name=searchType type=hidden value=1> <INPUT
name=searchSite type=hidden value=dWChina> <INPUT name=pageLang
type=hidden value=zh> <INPUT name=langEncoding type=hidden value=gb2312>
</FORM></TBODY></TABLE></TD></TR><A id=main name=main>
<TR>
<TD class=hbg height=21 width=160> </TD>
<TD class=bbg colSpan=2 height=21 vAlign=top> <A
class=mainlink
href="http://www-900.ibm.com/developerWorks/cn/cgi-bin/click.cgi?url=www-900.ibm.com/cn/&origin=dwhead">IBM
主页</A> <SPAN class=divider> | </SPAN> <A
class=mainlink
href="http://www-900.ibm.com/developerWorks/cn/cgi-bin/click.cgi?url=www-900.ibm.com/cn/products/index.shtml&origin=dwhead">产品与服务</A>
<SPAN class=divider> | </SPAN> <A class=mainlink
href="http://www-900.ibm.com/developerWorks/cn/cgi-bin/click.cgi?url=www-900.ibm.com/cn/support/index.shtml&origin=dwhead">支持与下载</A>
<SPAN class=divider> | </SPAN> <A class=mainlink
href="http://www-900.ibm.com/developerWorks/cn/cgi-bin/click.cgi?url=www-900.ibm.com/cn/account/index.shtml&origin=dwhead">个性化服务</A></TD></TR></TBODY></TABLE><!-- Color Bar -->
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR class=hil>
<TD height=1 width="100%"><IMG alt="" height=1
src="Linux环境进程间通信(三):消息队列.files/c.gif" width=592></TD></TR>
<TR class=dwr1>
<TD height=2 width="100%"><IMG alt="" height=2
src="Linux环境进程间通信(三):消息队列.files/c.gif" width=592></TD></TR>
<TR class=dwg3>
<TD height=1 width="100%"><IMG alt="" height=1
src="Linux环境进程间通信(三):消息队列.files/c.gif" width=592></TD></TR>
<TR class=bbg>
<TD height=1 width="100%"><IMG alt="" height=1
src="Linux环境进程间通信(三):消息队列.files/c.gif" width=592></TD></TR>
<TR class=hil>
<TD height=1 width="100%"><IMG alt="" height=1
src="Linux环境进程间通信(三):消息队列.files/c.gif" width=592></TD></TR></TBODY></TABLE><!-- Breadcrumb Trail -->
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR vAlign=top><!-- RIGHT GUTTER -->
<TD width=5><IMG alt="" border=0 height=1
src="Linux环境进程间通信(三):消息队列.files/c.gif" width=5></TD>
<TD width="100%">
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR vAlign=top>
<TD width="100%"><IMG alt="" border=0 height=4
src="Linux环境进程间通信(三):消息队列.files/c.gif" width=2><BR><B><A
href="http://www-900.ibm.com/developerWorks/cn/index.shtml">developerWorks
中国网站</A> : <A
href="http://www-900.ibm.com/developerWorks/cn/linux/index.shtml">Linux</A>
: <A
href="http://www-900.ibm.com/developerWorks/cn/cnpapers.nsf/linux-papers-bynewest?OpenView&Count=500">所有的文章
</A></B></TD>
<TD align=right width=136><A
href="http://www-900.ibm.com/developerWorks/cn/index.shtml"><IMG
alt="developerWorks 中国网站" border=0 height=24
src="Linux环境进程间通信(三):消息队列.files/dwlogo-small.gif" width=136></A></TD>
<TD width=5><IMG alt="" border=0 height=1
src="Linux环境进程间通信(三):消息队列.files/c.gif"
width=5></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><!-- End Breadcrumb Trail --><!-- Title Area-->
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR vAlign=top>
<TD colSpan=5><IMG alt="" border=0 height=15
src="Linux环境进程间通信(三):消息队列.files/c.gif" width=5></TD></TR>
<TR vAlign=top><!-- Title-->
<TD width=2><IMG alt="" border=0 height=1
src="Linux环境进程间通信(三):消息队列.files/c.gif" width=2></TD>
<TD><!-- <span class="astitle">[Series title]: </span>--><SPAN
class=atitle>Linux环境进程间通信(三):消息队列</SPAN></TD>
<TD width=8><IMG alt="" border=0 height=1
src="Linux环境进程间通信(三):消息队列.files/c.gif" width=8></TD>
<TD> </TD>
<TD width=6><IMG alt="" border=0 height=1
src="Linux环境进程间通信(三):消息队列.files/c.gif" width=6></TD></TR><!-- Black line separator-->
<TR vAlign=top>
<TD bgColor=#000000 colSpan=5><IMG alt="" border=0 height=1
src="Linux环境进程间通信(三):消息队列.files/c.gif" width=100></TD></TR>
<TR vAlign=top>
<TD bgColor=#ffffff colSpan=5><IMG alt="" border=0 height=8
src="Linux环境进程间通信(三):消息队列.files/c.gif" width=100></TD></TR></TBODY></TABLE><!-- END HEADER AREA and START BODY AREA-->
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR vAlign=top><!-- LEFT GUTTER-->
<TD width=5><IMG alt="" border=0 height=1
src="Linux环境进程间通信(三):消息队列.files/c.gif" width=5></TD><!-- START CENTER COLUMN-->
<TD width="100%">
<TABLE align=right border=0 cellPadding=0 cellSpacing=0 width=168>
<TBODY>
<TR><!-- Sidebar Gutter-->
<TD width=8><IMG alt="" height=21
src="Linux环境进程间通信(三):消息队列.files/c.gif" width=5></TD>
<TD width=160><!-- Start TOC-->
<TABLE border=0 cellPadding=0 cellSpacing=0 width=160>
<TBODY>
<TR>
<TD bgColor=#000000 height=1 width=160><IMG alt="" height=1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -