summaryrefslogtreecommitdiff
path: root/doc/zmq_term.3
diff options
context:
space:
mode:
authorMartin Lucina <mato@kotelna.sk>2011-03-28 10:39:51 +0200
committerMartin Lucina <martin@lucina.net>2012-01-23 08:53:37 +0100
commit3e20cb1b8a2b1ca222011df37334e5f4f88dd565 (patch)
tree4a753775186bc7f583f1ceb3f9aa675b6f110596 /doc/zmq_term.3
parent3f0085ddbef1a44b6bb7a0b23af497d56e0025fa (diff)
parente645fc2693acc796304498909786b7b47005b429 (diff)
Imported Debian patch 2.1.3-1debian/2.1.3-1
Diffstat (limited to 'doc/zmq_term.3')
-rw-r--r--doc/zmq_term.367
1 files changed, 39 insertions, 28 deletions
diff --git a/doc/zmq_term.3 b/doc/zmq_term.3
index 0f6daa4..608df99 100644
--- a/doc/zmq_term.3
+++ b/doc/zmq_term.3
@@ -2,12 +2,12 @@
.\" Title: zmq_term
.\" Author: [see the "AUTHORS" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 10/15/2010
+.\" Date: 03/15/2011
.\" Manual: 0MQ Manual
-.\" Source: 0MQ 2.0.10
+.\" Source: 0MQ 2.1.3
.\" Language: English
.\"
-.TH "ZMQ_TERM" "3" "10/15/2010" "0MQ 2\&.0\&.10" "0MQ Manual"
+.TH "ZMQ_TERM" "3" "03/15/2011" "0MQ 2\&.1\&.3" "0MQ Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -34,37 +34,39 @@ zmq_term \- terminate 0MQ context
\fBint zmq_term (void \fR\fB\fI*context\fR\fR\fB);\fR
.SH "DESCRIPTION"
.sp
-The \fIzmq_term()\fR function terminates the 0MQ context \fIcontext\fR\&.
+The \fIzmq_term()\fR function shall terminate the 0MQ context \fIcontext\fR\&.
.sp
-If there are no longer any sockets open within \fIcontext\fR at the time \fIzmq_term()\fR is called then \fIcontext\fR shall be shut down and all associated resources shall be released immediately\&.
-.sp
-Otherwise, the following applies:
+Context termination is performed in the following steps:
.sp
.RS 4
.ie n \{\
-\h'-04'\(bu\h'+03'\c
+\h'-04' 1.\h'+01'\c
.\}
.el \{\
.sp -1
-.IP \(bu 2.3
+.IP " 1." 4.2
.\}
-The
-\fIzmq_term()\fR
-function shall return immediately\&.
+Any blocking operations currently in progress on sockets open within
+\fIcontext\fR
+shall return immediately with an error code of ETERM\&. With the exception of
+\fIzmq_close()\fR, any further operations on sockets open within
+\fIcontext\fR
+shall fail with an error code of ETERM\&.
.RE
.sp
.RS 4
.ie n \{\
-\h'-04'\(bu\h'+03'\c
+\h'-04' 2.\h'+01'\c
.\}
.el \{\
.sp -1
-.IP \(bu 2.3
+.IP " 2." 4.2
.\}
-Any blocking operations currently in progress on sockets open within
-\fIcontext\fR
-shall return immediately with an error code of ETERM\&.
-.RE
+After interrupting all blocking calls,
+\fIzmq_term()\fR
+shall
+\fIblock\fR
+until the following conditions are satisfied:
.sp
.RS 4
.ie n \{\
@@ -74,10 +76,10 @@ shall return immediately with an error code of ETERM\&.
.sp -1
.IP \(bu 2.3
.\}
-With the exception of
-\fIzmq_close()\fR, any further operations on sockets open within
+All sockets open within
\fIcontext\fR
-shall fail with an error code of ETERM\&.
+have been closed with
+\fIzmq_close()\fR\&.
.RE
.sp
.RS 4
@@ -88,12 +90,16 @@ shall fail with an error code of ETERM\&.
.sp -1
.IP \(bu 2.3
.\}
-The actual shutdown of
-\fIcontext\fR, and release of any associated resources,
-\fBshall be delayed\fR
-until the last socket within it is closed with
-\fIzmq_close()\fR\&.
+For each socket within
+\fIcontext\fR, all messages sent by the application with
+\fIzmq_send()\fR
+have either been physically transferred to a network peer, or the socket\(cqs linger period set with the
+\fIZMQ_LINGER\fR
+socket option has expired\&.
+.RE
.RE
+.sp
+For further details regarding socket linger behaviour refer to the \fIZMQ_LINGER\fR option in \fBzmq_setsockopt\fR(3)\&.
.SH "RETURN VALUE"
.sp
The \fIzmq_term()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&.
@@ -105,12 +111,17 @@ The provided
\fIcontext\fR
was not valid (NULL)\&.
.RE
+.PP
+\fBEINTR\fR
+.RS 4
+Termination was interrupted by a signal\&. It can be restarted if needed\&.
+.RE
.SH "SEE ALSO"
.sp
-\fBzmq\fR(7) \fBzmq_init\fR(3)
+\fBzmq\fR(7) \fBzmq_init\fR(3) \fBzmq_close\fR(3) \fBzmq_setsockopt\fR(3)
.SH "AUTHORS"
.sp
-The 0MQ documentation was written by Martin Sustrik <\m[blue]\fBsustrik@250bpm\&.com\fR\m[]\&\s-2\u[1]\d\s+2> and Martin Lucina <\m[blue]\fBmato@kotelna\&.sk\fR\m[]\&\s-2\u[2]\d\s+2>\&.
+This 0MQ manual page was written by Martin Sustrik <\m[blue]\fBsustrik@250bpm\&.com\fR\m[]\&\s-2\u[1]\d\s+2> and Martin Lucina <\m[blue]\fBmato@kotelna\&.sk\fR\m[]\&\s-2\u[2]\d\s+2>\&.
.SH "NOTES"
.IP " 1." 4
sustrik@250bpm.com