From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 17 19:49:15 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23F242CE for ; Sat, 17 Jan 2015 19:49:15 +0000 (UTC) Received: from ms-10.1blu.de (ms-10.1blu.de [178.254.4.101]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6A4E8F for ; Sat, 17 Jan 2015 19:49:14 +0000 (UTC) Received: from [89.15.237.229] (helo=c720-r276659) by ms-10.1blu.de with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1YCZMn-0006pl-OR; Sat, 17 Jan 2015 20:49:06 +0100 Date: Sat, 17 Jan 2015 20:49:02 +0100 From: Matthias Apitz To: John-Mark Gurney Subject: Re: ctrl-d appends characters to output Message-ID: <20150117194902.GA1491@c720-r276659> Reply-To: Matthias Apitz Mail-Followup-To: Matthias Apitz , John-Mark Gurney , less xss , freebsd-hackers@freebsd.org References: <20150117194308.GH1949@funkthat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20150117194308.GH1949@funkthat.com> X-Operating-System: FreeBSD 11.0-CURRENT r269739 (i386) User-Agent: Mutt/1.5.23 (2014-03-12) X-Con-Id: 51246 X-Con-U: 0-guru X-Originating-IP: 89.15.237.229 Cc: freebsd-hackers@freebsd.org, less xss X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 19:49:15 -0000 El día Saturday, January 17, 2015 a las 11:43:08AM -0800, John-Mark Gurney escribió: > The D is not getting appended to your output... If you changed your > printf to include a space or two before the new line, you wouldn't > see the D... the D is left after the kernel echoed ^D in response to your > ctrl-D. If you redirect the output to a file and examined the output, > there would be no D in your output... Or if you provided input from > another source that didn't require an EOF to trigger it, such as: > $echo | ./t > 1 $ echo -n '' | ./a.out 0 matthias -- Matthias Apitz, guru@unixarea.de, http://www.unixarea.de/ +49-170-4527211 1989-2014: The Wall was torn down so that we go to war together again. El Muro ha sido derribado para que nos unimos en ir a la guerra otra vez. Diese Grenze wurde aufgehoben damit wir gemeinsam wieder in den Krieg ziehen.