bug-coreutils
[Top][All Lists]
Advanced

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

Re: signal-handling problems for "dd": some thoughts


From: Paul Jarc
Subject: Re: signal-handling problems for "dd": some thoughts
Date: Mon, 19 Apr 2004 15:27:26 -0400
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux)

Paul Eggert <address@hidden> wrote:
> http://www.opengroup.org/onlinepubs/007904975/utilities/dd.html
>
> the "ASYNCHRONOUS EVENTS" section specifies the behavior for SIGINT
> and says that dd "shall take the standard action for all other signals".

Ok, that makes sense, but...

> The basic idea is that SIGUSR1 is reserved for use by the user,
> and it's intended to be a fairly fatal signal: if part of a
> multiprocess application doesn't know what to do with SIGUSR1, it's
> supposed to exit immediately.

This would seem to make SIGUSR1 entirely redundant with SIGTERM.  As I
read the previous quote, the restriction is on the kernel not to
*send* SIGUSR1 "spontaneously" (as it does with SIGSEGV, SIGHUP,
SIGCHLD, etc.), so that userspace programs can define their own
semantics for it, and they can rest assured that it won't be triggered
by some unrelated event that the kernel notices.  (So I think dd would
be allowed to do this too, if not for the specific restriction on its
own page; I see no general restrictions against any part of the system
*catching* SIGUSR1.)  I can easily imagine a multiprocess application
sending SIGUSR1 between processes, but ISTM a multi*program*
application should not send such signals to "external" programs.

Maybe POSIXLY_CORRECT would be enough to satisfy the requirement?


paul




reply via email to

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