[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#338182: kfreebsd-5: signals for linuxthreads internal operation



Petr Salinger a écrit :
Package: kfreebsd-5 Severity: wishlist
Tags: patch

Hi,

with attached patch for kernel and clone.c it should be possible leave SIGUSR1 and SIGUSR2 free for user code.

Current libc will work with current and new kernel, new libc will require new kernel.

Thanks for the patch, a new kernel has just been uploaded. A new glibc will follow soon, probably tomorrow. I have already a working one on my disk, but I need to make a clean patch first.


--- clone.c.OLD 2005-11-08 17:25:02.000000000 +0100
+++ clone.c     2005-11-08 17:32:18.000000000 +0100
@@ -64,13 +64,13 @@
if ((flags & CSIGNAL) != 0 && (flags & CSIGNAL) != SIGCHLD)
     {
-      /* This implementation of clone() supports only the SIGUSR1 signal.  */
-      if ((flags & CSIGNAL) != SIGUSR1)
+      /* This implementation of clone() supports only the 128 signals.  */
+      if ((flags & CSIGNAL) & RFTHPNMASK)

This line has to be
+      if ((flags & CSIGNAL) & ~RFTHPNMASK)

        {
          __set_errno (EINVAL);
          return -1;
        }
-      rfork_flags |= RFLINUXTHPN;
+      rfork_flags |= (RFLINUXTHPN | ((flags & CSIGNAL) <<  RFTHPNSHIFT));
     }
if (flags & CLONE_VM)



Bye,
Aurelien

--
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net



Reply to: