bug-coreutils
[Top][All Lists]
Advanced

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

bug#9076: coreutils-8.12 uses SA_RESETHAND and SA_RESTART unconditionall


From: Pádraig Brady
Subject: bug#9076: coreutils-8.12 uses SA_RESETHAND and SA_RESTART unconditionally
Date: Fri, 15 Jul 2011 01:25:27 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3

On 14/07/11 23:33, Paul Eggert wrote:
> [CC'ing bug-gnulib re <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9076>.]
> 
> On 07/13/11 23:54, Joachim Schmitz wrote:
> 
>> coreutils-8.12 uses SA_RESETHAND and SA_RESTART unconditionally and on HP
>> NonStop these don't exist.
> 
> Thanks for reporting this.  I think
> coreutils used to be portable to hosts lacking those symbols,
> and there's a bit of code in dd.c that still assumes the
> old backward-compatibility stuff:
> 
> static void
> interrupt_handler (int sig)
> {
>   if (! SA_RESETHAND)
>     signal (sig, SIG_DFL);
>   interrupt_signal = sig;
> }
> 
> but I guess it got ripped out at some point, under the mistaken
> assumption that everybody has SA_RESETHAND nowadays.  Here's a proposed patch
> to gnulib to address this porting problem.

I'm not sure about defining these to 0 in gnulib.
That will silently ignore the intent of a program on certain platforms.
Wouldn't it be better to fail to compile so that each program then does:

#ifndef SA_RESETHAND
/* do something else */
#endif

cheers,
Pádraig.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]