From owner-freebsd-bugs@FreeBSD.ORG Fri Feb 25 16:20:06 2011 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 893771065675 for ; Fri, 25 Feb 2011 16:20:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 564B28FC1B for ; Fri, 25 Feb 2011 16:20:06 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p1PGK6O0039721 for ; Fri, 25 Feb 2011 16:20:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p1PGK6iK039720; Fri, 25 Feb 2011 16:20:06 GMT (envelope-from gnats) Resent-Date: Fri, 25 Feb 2011 16:20:06 GMT Resent-Message-Id: <201102251620.p1PGK6iK039720@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Chris Rees Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA89E1065670 for ; Fri, 25 Feb 2011 16:11:58 +0000 (UTC) (envelope-from crees@zeus.bayofrum.net) Received: from relay.pcl-ipout02.plus.net (relay.pcl-ipout02.plus.net [212.159.7.100]) by mx1.freebsd.org (Postfix) with ESMTP id 4070B8FC08 for ; Fri, 25 Feb 2011 16:11:57 +0000 (UTC) Received: from outmx04.plus.net ([212.159.14.19]) by relay.pcl-ipout02.plus.net with ESMTP; 25 Feb 2011 15:43:05 +0000 Received: from [91.125.147.237] (helo=zeus.bayofrum.net) by outmx04.plus.net with esmtp (Exim) id 1Pszou-0000cG-QX for FreeBSD-gnats-submit@freebsd.org; Fri, 25 Feb 2011 15:43:05 +0000 Received: from zeus.bayofrum.net (crees@localhost [127.0.0.1]) by zeus.bayofrum.net (8.14.4/8.14.4) with ESMTP id p1PFed33009779 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO) for ; Fri, 25 Feb 2011 15:40:39 GMT (envelope-from crees@zeus.bayofrum.net) Received: (from crees@localhost) by zeus.bayofrum.net (8.14.4/8.14.4/Submit) id p1PFedix009778; Fri, 25 Feb 2011 15:40:39 GMT (envelope-from crees) Message-Id: <201102251540.p1PFedix009778@zeus.bayofrum.net> Date: Fri, 25 Feb 2011 15:40:39 GMT From: Chris Rees To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: bin/155034: [PATCH] dd(1) dies on SIGUSR1; should print info X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Chris Rees List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Feb 2011 16:20:06 -0000 >Number: 155034 >Category: bin >Synopsis: [PATCH] dd(1) dies on SIGUSR1; should print info >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Feb 25 16:20:05 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Chris Rees >Release: FreeBSD 8.1-RELEASE-p2 i386 >Organization: >Environment: System: FreeBSD zeus.bayofrum.net 8.1-RELEASE-p2 FreeBSD 8.1-RELEASE-p2 #0: Wed Feb 23 16:10:57 UTC 2011 root@zeus.bayofrum.net:/usr/obj/usr/src/sys/ZEUS i386 >Description: [1] describes how SIGUSR1 can be used instead of SIGINFO to get the current status of dd in GNU coreutils, and when I unsuspectingly used SIGUSR1 to query FreeBSD dd just now I killed it... I understand that there are differences between systems, but I think that I received a rather harsh punishment here! [1] http://www.gnu.org/software/coreutils/manual/coreutils.html#dd-invocation >How-To-Repeat: [crees@zeus]~% dd if=/dev/random of=/dev/null & [1] 9693 [crees@zeus]~% kill -USR1 9693 [crees@zeus]~% [1] User signal 1 dd if=/dev/random of=/dev/null [crees@zeus]~% fg fg: No current job. [crees@zeus]~% j [crees@zeus]~% >Fix: --- dd-sigusr1.patch begins here --- Index: dd.c =================================================================== RCS file: /exports/cvsroot-freebsd/src/bin/dd/dd.c,v retrieving revision 1.43 diff -u -r1.43 dd.c --- dd.c 15 Aug 2004 19:10:05 -0000 1.43 +++ dd.c 25 Feb 2011 15:31:58 -0000 @@ -90,6 +90,7 @@ setup(); (void)signal(SIGINFO, summaryx); + (void)signal(SIGUSR1, summaryx); (void)signal(SIGINT, terminate); atexit(summary); --- dd-sigusr1.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: