Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Jun 2002 17:50:36 +0200 (CEST)
From:      Martin Faxer <gmh003532@brfmasthugget.se>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/38862: ping6 prints an annoying extra newline after the summary output 
Message-ID:  <200206031550.g53FoauL001976@lockdown.spectrum.fearmuffs.net>

next in thread | raw e-mail | index | archive | help

>Number:         38862
>Category:       bin
>Synopsis:       ping6 prints an annoying extra newline after the summary output
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 03 09:00:04 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Martin Faxer
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
none 
>Environment:
System: FreeBSD lockdown.spectrum.fearmuffs.net 5.0-CURRENT FreeBSD 5.0-CURRENT #4: Tue May 7 19:33:40 CEST 2002 redpixel@lockdown.spectrum.fearmuffs.net:/usr/obj/usr/src/sys/LOCKDOWN i386


	
>Description:
	
ping6 insists on printing an extra newline after the summary output.
this is inconsistent with normal ping and in my humble opinion
terribly ugly.  unless there is a good reason for keeping it the old
way i request that this be changed.

after some debugging i found that the extra newline came from the
explicit kill of the process' own pid.  i'm not sure why this is done,
and my patch might break something, but at least it fixes the problem
for me.
>How-To-Repeat:
	
run ping6 and press ctrl-c after some packets have been sent.
>Fix:

	

--- ping6.diff begins here ---
Index: ping6/ping6.c
===================================================================
RCS file: /home/ncvs/src/sbin/ping6/ping6.c,v
retrieving revision 1.18
diff -u -r1.18 ping6.c
--- ping6/ping6.c	21 Mar 2002 13:20:47 -0000	1.18
+++ ping6/ping6.c	3 Jun 2002 15:39:16 -0000
@@ -2147,9 +2147,7 @@
 	summary();
 
 	(void)signal(SIGINT, SIG_DFL);
-	(void)kill(getpid(), SIGINT);
 
-	/* NOTREACHED */
 	exit(1);
 }
 
--- ping6.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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