r2771 - in glibc-package/trunk/debian: . patches patches/any
Author: aurel32
Date: 2008-01-06 04:22:07 +0000 (Sun, 06 Jan 2008)
New Revision: 2771
Added:
glibc-package/trunk/debian/patches/any/local-linuxthreads-fd.diff
Modified:
glibc-package/trunk/debian/changelog
glibc-package/trunk/debian/patches/series
Log:
* patches/any/local-linuxthreads-fd.diff: new patch to make sure
linuxthreads doesn't use stdin, stdout or stderr for its internal
use.
Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog 2008-01-03 10:46:44 UTC (rev 2770)
+++ glibc-package/trunk/debian/changelog 2008-01-06 04:22:07 UTC (rev 2771)
@@ -12,11 +12,14 @@
* kfreebsd/local-sysdeps.diff: update to revision 2094 (from glibc-bsd).
* patches/amd64/cvs-vdso_clock_gettime.diff: new patch from CVS to fix
static linking on amd64.
+ * patches/any/local-linuxthreads-fd.diff: new patch to make sure
+ linuxthreads doesn't use stdin, stdout or stderr for its internal
+ use.
[ Clint Adams ]
* debhelper.in/nscd.init: use lsb output functions. Closes: #457661.
- -- Aurelien Jarno <aurel32@debian.org> Thu, 03 Jan 2008 11:43:30 +0100
+ -- Aurelien Jarno <aurel32@debian.org> Sun, 06 Jan 2008 05:21:38 +0100
glibc (2.7-5) unstable; urgency=low
Added: glibc-package/trunk/debian/patches/any/local-linuxthreads-fd.diff
===================================================================
--- glibc-package/trunk/debian/patches/any/local-linuxthreads-fd.diff (rev 0)
+++ glibc-package/trunk/debian/patches/any/local-linuxthreads-fd.diff 2008-01-06 04:22:07 UTC (rev 2771)
@@ -0,0 +1,32 @@
+--- linuxthreads/pthread.c.orig 2008-01-06 04:37:45.000000000 +0100
++++ linuxthreads/pthread.c 2008-01-06 05:08:35.000000000 +0100
+@@ -662,6 +662,29 @@
+ free(__pthread_manager_thread_bos);
+ return -1;
+ }
++ /* Make sure the file descriptors of the pipe doesn't collide
++ with stdin, stdout or stderr if they have been closed. */
++ if (manager_pipe[0] < 3) {
++ int new_fd;
++ new_fd = fcntl(manager_pipe[0], F_DUPFD, 3);
++ close(manager_pipe[0]);
++ if (new_fd == -1) {
++ free(__pthread_manager_thread_bos);
++ return -1;
++ }
++ manager_pipe[0] = new_fd;
++ }
++ if (manager_pipe[1] < 3) {
++ int new_fd;
++ new_fd = fcntl(manager_pipe[1], F_DUPFD, 3);
++ close(manager_pipe[1]);
++ if (new_fd == -1) {
++ close(manager_pipe[0]);
++ free(__pthread_manager_thread_bos);
++ return -1;
++ }
++ manager_pipe[1] = new_fd;
++ }
+
+ #ifdef USE_TLS
+ /* Allocate memory for the thread descriptor and the dtv. */
Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series 2008-01-03 10:46:44 UTC (rev 2770)
+++ glibc-package/trunk/debian/patches/series 2008-01-06 04:22:07 UTC (rev 2771)
@@ -145,6 +145,7 @@
any/local-libgcc-compat-main.diff -p0
any/local-libgcc-compat-ports.diff -p0
any/local-linuxthreads-defines.diff -p0
+any/local-linuxthreads-fd.diff -p0
any/local-linuxthreads-gscope.diff -p0
any/local-linuxthreads-lowlevellock.diff -p0
any/local-linuxthreads-fatalprepare.diff -p0
Reply to: