Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37740893
en ru br
Репозитории ALT
S:6.20.00-alt4
5.1: 6.16.00-alt1
4.1: 6.16.00-alt0.M41.1
4.0: 6.14.00-alt2
3.0: 6.14.00-alt1
www.altlinux.org/Changes

Группа :: Интерпретаторы команд
Пакет: tcsh

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: 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);
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin