[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#9076: coreutils-8.12 uses SA_RESETHAND and SA_RESTART unconditionall
bug#9076: coreutils-8.12 uses SA_RESETHAND and SA_RESTART unconditionally
Fri, 15 Jul 2011 01:25:27 +0100
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:22.214.171.124) 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:
/* do something else */
bug#9076: coreutils-8.12 uses SA_RESETHAND and SA_RESTART unconditionally, Bruno Haible, 2011/07/15