linux-mips-fnet
[Top] [All Lists]

Re: SA_* in Linux 2.0.x und 2.2.x

To: Ralf Baechle <ralf@uni-koblenz.de>
Subject: Re: SA_* in Linux 2.0.x und 2.2.x
From: Andreas Jaeger <aj@arthur.rhein-neckar.de>
Date: 23 Aug 1999 08:17:41 +0200
Cc: linux-mips@fnet.fr
In-reply-to: Ralf Baechle's message of "Sun, 22 Aug 1999 23:14:11 +0200"
References: <u867297eol.fsf@arthur.rhein-neckar.de> <19990822013332.H25686@uni-koblenz.de> <u8so5c5lv4.fsf@arthur.rhein-neckar.de> <19990822231411.C16497@uni-koblenz.de>
User-agent: Gnus/5.070095 (Pterodactyl Gnus v0.95) XEmacs/21.1 (Arches)
>>>>> Ralf Baechle writes:

Ralf> On Sun, Aug 22, 1999 at 09:13:19AM +0200, Andreas Jaeger wrote:
Ralf> Shouldn't the SV_* constants have the same values as their SA_*
Ralf> counterparts?
>> 
>> Which SV_* constants?

Ralf> The BSD sigvector thingies defined in <signal.h>:

Ralf> /* Bits in `sv_flags'.  */
Ralf> # define SV_ONSTACK     (1 << 0)/* Take the signal on the signal stack.  
*/
Ralf> # define SV_INTERRUPT   (1 << 1)/* Do not restart system calls.  */
Ralf> # define SV_RESETHAND   (1 << 2)/* Reset handler to SIG_DFL on receipt.  
*/

No problem - see the implementation of sigvec in
glibc/sysdeps/posix/sigvec.c:
          if (sv_flags & SV_ONSTACK)
            {
#ifdef SA_ONSTACK
              sa_flags |= SA_ONSTACK;
#else
              __set_errno (ENOSYS);
              return -1;
#endif

There's no correspondence between the values of the flags.

>> I fear we need to do some emulation in sigaction for the old flags to
>> support both Linux 2.0 and 2.2 kernels with the same glibc.

Ralf> No, because only the kernel changed.  glibc never changed so there is
Ralf> no reason to support other values for these bits than what is defined in
Ralf> glibc.  It's a kernel messup and I'll fix it just there.  Or?

I see - yes, please fix the kernel so that it is again in synch with
glibc.  I'll make the appropiate changes in glibc 2.2.

Andreas
-- 
 Andreas Jaeger   aj@arthur.rhein-neckar.de    jaeger@informatik.uni-kl.de
  for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de

<Prev in Thread] Current Thread [Next in Thread>