>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 [email protected]:/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:
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to