bug-coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] Replacement for the sigs_to_ignore hack in timeout.c


From: Jim Meyering
Subject: Re: [PATCH] Replacement for the sigs_to_ignore hack in timeout.c
Date: Fri, 10 Oct 2008 14:44:01 +0200

Eric Blake <address@hidden> wrote:
> According to Giuseppe Scrivano on 10/6/2008 3:33 PM:
>> +  sigaction (sig, NULL, &sa);
>> +  handler = sa.sa_handler;
>> +  sa.sa_handler = SIG_IGN;
>
> This is not necessarily safe, if SA_SIGINFO is set (sa.handler and
> sa_siginfo are not required to occupy the same memory, but SIG_IGN is only
> assignable to sa_handler).  On the other hand, timeout is not using
> SA_SIGINFO, so this really doesn't matter here.
>
> On the other hand, POSIX is explicit that mixing signal and sigaction is
> not portable.  For that matter, now that gnulib provides a guaranteed
> sigaction, why don't we just change all of coreutils to use it?  Affected
> are: csplit, dd, install, ls, nohup, sort, tee, and timeout.

Good idea.
I've wanted to get rid of "signal" uses for ages.
Are you interested in doing it?




reply via email to

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