Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Mar 2011 22:18:20 -0400
From:      "J. Hellenthal" <jhell@DataIX.net>
To:        Chris Rees <utisoft@gmail.com>
Cc:        Oliver Fromme <olli@lurza.secnetix.de>, David Schultz <das@freebsd.org>, Maxim Konovalov <maxim.konovalov@gmail.com>, FreeBSD Standards <freebsd-standards@freebsd.org>
Subject:   Re: dd dies on SIGUSR1
Message-ID:  <alpine.BSF.2.00.1103222136510.17256@qvfongpu.qngnvk.ybpny>
In-Reply-To: <AANLkTi=PE6beTB1wmC8v41PqAWWSqq%2B6z-Be44uePYtZ@mail.gmail.com>
References:  <AANLkTikoZNpmM83%2BU-0AWhO43K67gKNq1dZ4UnL2UAPo@mail.gmail.com> <201103221457.p2MEvJub035858@lurza.secnetix.de> <AANLkTinzhKi-sfW-kz9W6EkA0WtB5-nO0gpyCLRyyHCn@mail.gmail.com> <20110322181604.GA47588@zim.MIT.EDU> <AANLkTi=PE6beTB1wmC8v41PqAWWSqq%2B6z-Be44uePYtZ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Content-Transfer-Encoding: QUOTED-PRINTABLE


On Tue, 22 Mar 2011 16:01, utisoft@ wrote:
> On 22 March 2011 18:16, David Schultz <das@freebsd.org> wrote:
>> On Tue, Mar 22, 2011, Chris Rees wrote:
>>> Since POSIX has SIGUSR[12] as undefined, I think it's a POLA violation
>>> to have processes die when provided.
>>
>> Quite the contrary: The default behavior of SIGUSR1 on FreeBSD
>> follows both POSIX and historical precedent, so changing it would
>> be a violation of POLA.  Terminating the process is also the
>> default on Linux.
>
> However... I still think that because no-one in their right mind would
> use SIGUSR[12] to terminate a program it's pointless for it to happen,
> and can only cause annoyance.
>
> People want to hold onto historical behaviour for no good reason, and
> I feel that this is one of these occasions. There is no reason for it
> apart from 'that's how it always has been [because no-one's
> complained]'. I also disagree that it 'follows' POSIX, POLA *IMO* for
> undefined behaviour is generally do nothing or report an error.
>
>> Linux dd's interpretation of SIGUSR1 seems rather poorly
>> considered, since as you note, utilities that don't handle it will
>> simply die unexpectedly.  However, it certainly wouldn't hurt to
>> patch FreeBSD's dd to handle SIGUSR1 the same way as SIGINFO.
>>
>
> Could the original patch in the PR be good enough then?
>
> Thank you for the thoughts.
>
> I'm sorry if I seem to be ranting, and I fully understand if my
> proposal of changing the default of USR1 is rejected completely; I
> just wanted to have a reasoned discussion.
>
> David, if you think the original patch (which does what your last
> paragraph says) is OK then feel free to take that as the Fix.
>
> Thanks!
>

No offense but there has been plenty of reasoning here just given in your 
very own message at the top. I can probably count the number of times that 
I have had to actually had to use -USR1 & -USR2 on two hands. The times 
that I have was when it was purposely programmed into something and more 
than likely on a Linux machine and documented in the manual page or 
somewhere on the authors site.

Assuming -USR[N] will get you -INFO does not mean the utilities you were 
using were incorrect and needed to be changed. It means you need to change 
your aspect of the portability of your syntax. Some systems go to far to 
keep the end-user from shooting them self in the foot and this would be 
one of those cases.

If a program receives a signal it should do *something* if it has nothing 
to do then it should *terminate*. The author of said software here gave it 
nothing else to do, therefore it terminates...


- -15

- -- 

  Regards,

  J. Hellenthal
  (0x89D8547E)
  JJH48-ARIN

-----BEGIN PGP SIGNATURE-----
Comment: THIS SOFTWARE AND/OR CONTENTS IS PROVIDED BY THE AUTHOR ``AS IS'' AND
Comment: ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Comment: IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
Comment: PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
Comment: DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Comment: DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
Comment: OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
Comment: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
Comment: STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
Comment: IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
Comment: POSSIBILITY OF SUCH DAMAGE.

iQEbBAEBAgAGBQJNiVh5AAoJEJBXh4mJ2FR+hDMH8gPN6QepA+5vwGZl6nMQcxbw
dhypuWLxB8ssqsXEFf3LjAN6/YsPl60ZpjhWl83rB5oaF3FpgMxz0GNDpbxg0eoB
wrf92PYz/KWoMrsnJn2gdAnDvZw9/a9DxlUYTcnGTe1ryCHX6A0JKra77WdFXCDC
386xM7ZolFZ6Ozwggq+O8WOpQzWuhvfYK38ErthNWuROvJ9vNDtVoWWIHIys6Bxi
5DKDoi51MWbT4k2xqot+ZqrquJYLOhvzxMfW2wYTKUdRAYZ4va2Pm3zEpD8FEUZv
hrO4fZJaCt/RI83lLQuHyLY8NVn7DcScLBwXZQtpxnA6UWzOHgFXdWFiwdxlzw==
=HuiA
-----END PGP SIGNATURE-----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1103222136510.17256>