Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Jan 2015 20:49:02 +0100
From:      Matthias Apitz <guru@unixarea.de>
To:        John-Mark Gurney <jmg@funkthat.com>
Cc:        freebsd-hackers@freebsd.org, less xss <less.xss@gmail.com>
Subject:   Re: ctrl-d appends characters to output
Message-ID:  <20150117194902.GA1491@c720-r276659>
In-Reply-To: <20150117194308.GH1949@funkthat.com>
References:  <CAGcjGpP0t3%2BcJLRHS5Ggfjao9Vcy0xosAg2KqBWgVA_NtKoNgA@mail.gmail.com> <20150117194308.GH1949@funkthat.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



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