This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug linuxthreads/2383] [PATCH] Please use sysdeps for selecting linuxthreads internal signals


------- Additional Comments From Petr dot Salinger at seznam dot cz  2006-04-26 17:26 -------
> So... why not define __SIGRTMIN to 32 while building glibc?  Seems like
> everything would just work, modulo maybe changes to your allocrtsig.c.

We can't. :-( 

On FreeBSD 5.x and 6.x there are no rt-signals.
So we must not advertise them via __ASSUME_REALTIME_SIGNALS,
otherwise rt variants of pthread_restart(), pthread_suspend(),
pthread_timedsuspend()
will be used (see restart.h) => BAD.

Iff we don't advertise them, init_rtsigs () calls _libc_current_sigrtmin_private ().

Based on result, it will either
 -  use SIGRTMIN & rt-variants   => again BAD
 -  use USR1 & USR2 & non-rt variants => BAD (same collision as with linux 2.0)

Moreover

- it looks like  __SIGRTMIN is also used for advertising whether real-time
signals are available 
- there will be rt-signals in FreeBSD 7.x, but with numbers #65-#126 
 - we must use #32-#34 for __pthread_sig_*, they have special security handling
in kernel, otherwise setuid threaded application breaks.

Proposed patch only moves a few bits into sysdeps to allow us to override it as
needed.
It  does not change behaviour on Linux.

Thanks for  your time.

Petr

>From http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/sys/signal.h

****************************
#if __BSD_VISIBLE
#define SIGTHR          32      /* reserved by thread library. */
#define SIGLWP          SIGTHR
#endif

#define SIGRTMIN        65
#define SIGRTMAX        126
*****************************

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=2383

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]