dd dies on SIGUSR1

Chris Rees utisoft at gmail.com
Mon Mar 21 16:11:21 UTC 2011


On 21 March 2011 14:43, Maxim Konovalov <maxim.konovalov at gmail.com> wrote:
> On Mon, 21 Mar 2011, 12:03-0000, Chris Rees wrote:
>
>> Hi all,
>>
>> Does anyone have any thoughts on [1]?
>>
>>
>> It's a common usage in GNU systems to send SIGUSR1 to dd, which
>> causes it to print info. However... when I tried it it died (ouch).
>>
>> Two patches are in the PR, one to print summary (imitate GNU) and
>> after talking to gavin@ on #bsdcode I made one to ignore the signal.
>>
>> Which one of these fixes will be most popular?
>>
> FreeBSD uses SIGINFO for such purposes for ages in many programs
> apart from dd(1).  IMHO, nothing to fix here.

Of course, and I'm not suggesting that FreeBSD is wrong in any way.

My point was that it was rather a harsh punishment for using a GNU-ism
where dd died after 30 minutes of chugging or so.

Would it hurt for dd to ignore the signal rather than die? I imagine a
lot less than otherwise.

Chris


More information about the freebsd-standards mailing list