- document why to use shutdown() before close() when dealing with sockets on close(2) man page (#650985)

This commit is contained in:
Peter Schiffer 2012-09-13 19:24:05 +02:00
parent c1938306dc
commit 55839c4a07
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,17 @@
diff -ur man-pages-3.42.orig/man2/close.2 man-pages-3.42/man2/close.2
--- man-pages-3.42.orig/man2/close.2 2012-08-14 00:39:35.000000000 +0200
+++ man-pages-3.42/man2/close.2 2012-09-13 19:16:38.136978496 +0200
@@ -114,6 +114,13 @@
Since a file descriptor may be reused,
there are some obscure race conditions
that may cause unintended side effects.
+.PP
+When dealing with sockets, you have to be sure that there is no
+.BR recv (2)
+still blocking on it on another thread, otherwise it might block forever,
+since no more messages will be send via the socket. Be sure to use
+.BR shutdown (2)
+to shut down all parts the connection before closing the socket.
.\" Date: Tue, 4 Sep 2007 13:57:35 +0200
.\" From: Fredrik Noring <noring@nocrew.org>
.\" One such race involves signals and ERESTARTSYS. If a file descriptor

View File

@ -57,6 +57,8 @@ Patch51: man-pages-3.42-ip.patch
Patch52: man-pages-3.42-ip-local-port.patch
# resolves: #809490
Patch53: man-pages-3.42-getdents.patch
# resolves: #650985
Patch54: man-pages-3.42-close.patch
Autoreq: false
@ -92,6 +94,7 @@ Documentation Project (LDP).
%patch51 -p1
%patch52 -p1
%patch53 -p1
%patch54 -p1
## Remove man pages we are not going to use ##
@ -170,6 +173,7 @@ cd ..
- improved explanation about calling listen or connect on the ip(7) man page (#787567)
- added information about incorrect use of getdents(2) call to the man page (#809490)
- removed man-pages-3.22-sched_setaffinity.patch because the problem it describes was fixed in the kernel. see #533811 for more info
- document why to use shutdown() before close() when dealing with sockets on close(2) man page (#650985)
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.41-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild