r6009 - in glibc-package/trunk/debian: . patches/kfreebsd

2014-04-03 Thread Petr Salinger
Author: ps-guest
Date: 2014-04-03 15:10:59 + (Thu, 03 Apr 2014)
New Revision: 6009

Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/patches/kfreebsd/local-fbtl.diff
Log:
update pthread.h for kfreebsd


Modified: glibc-package/trunk/debian/changelog
===
--- glibc-package/trunk/debian/changelog2014-04-02 07:11:23 UTC (rev 
6008)
+++ glibc-package/trunk/debian/changelog2014-04-03 15:10:59 UTC (rev 
6009)
@@ -8,6 +8,10 @@
   * control.in/main: Bump hurd dependency to version with newer RPCs.
   * libc0.3.symbols.hurd-i386: Update accordingly.
 
+  [ Petr Salinger ]
+  * kfreebsd/local-sysdeps.diff: update to revision 5460 (from glibc-bsd).
+  * kfreebsd/local-fbtl.diff: likewise
+
  -- Aurelien Jarno   Sun, 02 Mar 2014 16:19:49 +0100
 
 eglibc (2.18-4) unstable; urgency=high

Modified: glibc-package/trunk/debian/patches/kfreebsd/local-fbtl.diff
===
--- glibc-package/trunk/debian/patches/kfreebsd/local-fbtl.diff 2014-04-02 
07:11:23 UTC (rev 6008)
+++ glibc-package/trunk/debian/patches/kfreebsd/local-fbtl.diff 2014-04-03 
15:10:59 UTC (rev 6009)
@@ -34098,7 +34098,7 @@
 +#endif/* pthread-functions.h */
 --- /dev/null
 +++ b/fbtl/sysdeps/pthread/pthread.h
-@@ -0,0 +1,1181 @@
+@@ -0,0 +1,1177 @@
 +/* Copyright (C) 2002-2013 Free Software Foundation, Inc.
 +   This file is part of the GNU C Library.
 +
@@ -34495,8 +34495,6 @@
 +
 +#ifdef __USE_GNU
 +
-+#ifdef _LIBC /* not yet supported, so do not expose outside libc */
-+
 +/* Thread created with attribute ATTR will be limited to run only on
 +   the processors represented in CPUSET.  */
 +extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr,
@@ -34511,6 +34509,8 @@
 +  cpu_set_t *__cpuset)
 + __THROW __nonnull ((1, 3));
 +
++#ifdef _LIBC /* not yet supported, so do not expose outside libc */
++
 +/* Get the default attributes used by pthread_create in this process.  */
 +extern int pthread_getattr_default_np (pthread_attr_t *__attr)
 + __THROW __nonnull ((1));
@@ -34550,6 +34550,7 @@
 +/* Set the scheduling priority for TARGET_THREAD.  */
 +extern int pthread_setschedprio (pthread_t __target_thread, int __prio)
 + __THROW;
++#endif /* not yet supported, so do not expose outside libc */
 +
 +
 +#ifdef __USE_GNU
@@ -34563,7 +34564,6 @@
 + __THROW __nonnull ((2));
 +#endif
 +
-+#endif /* not yet supported, so do not expose outside libc */
 +
 +#ifdef __USE_UNIX98
 +/* Determine level of concurrency.  */
@@ -34580,8 +34580,6 @@
 +   implementation.  */
 +extern int pthread_yield (void) __THROW;
 +
-+#ifdef _LIBC /* not yet supported, so do not expose outside libc */
-+
 +/* Limit specified thread TH to run only on the processors represented
 +   in CPUSET.  */
 +extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize,
@@ -34593,8 +34591,6 @@
 + cpu_set_t *__cpuset)
 + __THROW __nonnull ((3));
 +
-+#endif /* not yet supported, so do not expose outside libc */
-+
 +#endif
 +
 +


-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/e1wvjib-0001gu...@moszumanska.debian.org



Bug#742965: libc0.1: openpty()/forkpty() fail on kfreebsd >=9.0

2014-04-03 Thread Adam Borowski
On Wed, Apr 02, 2014 at 09:45:23AM +0200, Petr Salinger wrote:
> The problem is not the handler for SIGCHLD, but it's content.

Yeah, same happens with SA_NOCLDWAIT, it's about whether the child gets
reaped.

> I doubt that the testcase worked under previous kernels.

My bad, I did not test this particular testcase but a larger body of code,
with tons of different pty code paths (handling IRIX, old SunOS and such)
on different Debian releases, it probably did something else.  The small
test case behaves the same on 8.x and 9.x.  Sorry for undertesting.

> The openpty() uses internally fork and waitpid.
> The waitpid in the testcase signal handler eats result needed by
> openpty implementation.

The offending code is in grantpt(), which openpty() calls.

I wonder how to fix it.  Merely documenting the restriction isn't really an
option, as no widespread system has it.  Saving the signal handler,
disabling it then restoring would work but introduces a slight race
condition (a child process can exit while we're in grantpt()).

It's interesting what real FreeBSD does.  Apparently, grantpt() is a no-op
there:

http://svnweb.freebsd.org/base/head/lib/libc/stdlib/ptsname.c?view=markup

but blindly commenting out the calls to grantpt()+unlockpt() doesn't seem
work to for us.


Meow!
-- 
A tit a day keeps the vet away.


-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140403140650.ga12...@angband.pl