rpms/tcsh/devel tcsh-6.15.00-closem.patch,NONE,1.1

Vitezslav Crhonek (vcrhonek) fedora-extras-commits at redhat.com
Mon Aug 27 15:05:05 UTC 2007


Author: vcrhonek

Update of /cvs/extras/rpms/tcsh/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21367

Added Files:
	tcsh-6.15.00-closem.patch 
Log Message:
add patch

tcsh-6.15.00-closem.patch:

--- NEW FILE tcsh-6.15.00-closem.patch ---
--- tcsh-6.15.00/sh.misc.c_old	2006-10-14 19:57:21.000000000 +0200
+++ tcsh-6.15.00/sh.misc.c	2007-08-27 15:55:20.000000000 +0200
@@ -255,6 +255,7 @@
 closem(void)
 {
     int f, num_files;
+    struct stat st;
 
 #ifdef NLS_BUGS
 #ifdef NLS_CATALOGS
@@ -272,6 +273,16 @@
 #ifdef MALLOC_TRACE
 	    && f != 25
 #endif /* MALLOC_TRACE */
+#ifdef S_ISSOCK
+           /* NSS modules (e.g. Linux nss_ldap) might keep sockets open.
+            * If we close such a socket, both the NSS module and tcsh think
+            * they "own" the descriptor.
+            *
+            * Not closing sockets does not make the cleanup use of closem()
+            * less reliable because tcsh never creates sockets.
+            */
+           && fstat(f, &st) == 0 && !S_ISSOCK(st.st_mode)
+#endif
 	    )
 	  {
 	    xclose(f);




More information about the fedora-extras-commits mailing list