From redpixel@lockdown.spectrum.fearmuffs.net  Mon Jun  3 08:50:54 2002
Return-Path: <redpixel@lockdown.spectrum.fearmuffs.net>
Received: from lockdown.spectrum.fearmuffs.net (c164-147.pro.thalamus.se [212.31.164.147])
	by hub.freebsd.org (Postfix) with ESMTP id 4EBB937B401
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  3 Jun 2002 08:50:43 -0700 (PDT)
Received: from lockdown.spectrum.fearmuffs.net (localhost.spectrum.fearmuffs.net [127.0.0.1])
	by lockdown.spectrum.fearmuffs.net (8.12.3/8.12.3) with ESMTP id g53FoaLB001977
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 3 Jun 2002 17:50:36 +0200 (CEST)
	(envelope-from redpixel@lockdown.spectrum.fearmuffs.net)
Received: (from redpixel@localhost)
	by lockdown.spectrum.fearmuffs.net (8.12.3/8.12.3/Submit) id g53FoauL001976;
	Mon, 3 Jun 2002 17:50:36 +0200 (CEST)
	(envelope-from redpixel)
Message-Id: <200206031550.g53FoauL001976@lockdown.spectrum.fearmuffs.net>
Date: Mon, 3 Jun 2002 17:50:36 +0200 (CEST)
From: Martin Faxer <gmh003532@brfmasthugget.se>
Reply-To: Martin Faxer <gmh003532@brfmasthugget.se>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: ping6 prints an annoying extra newline after the summary output 
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         38862
>Category:       bin
>Synopsis:       ping6 prints an annoying extra newline after the summary output
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    ume
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 03 09:00:04 PDT 2002
>Closed-Date:    Sun Jul 07 11:21:49 PDT 2002
>Last-Modified:  Sun Jul 07 11:21:49 PDT 2002
>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:
State-Changed-From-To: open->closed 
State-Changed-By: ume 
State-Changed-When: Sun Jul 7 11:20:23 PDT 2002 
State-Changed-Why:  
Thanks!  I've just committed it with some modification. 


Responsible-Changed-From-To: freebsd-bugs->ume 
Responsible-Changed-By: ume 
Responsible-Changed-When: Sun Jul 7 11:20:23 PDT 2002 
Responsible-Changed-Why:  
Thanks!  I've just committed it with some modification. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=38862 
>Unformatted:
