From owner-freebsd-stable@FreeBSD.ORG Tue Feb 11 00:28:56 2014 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CFCADB56; Tue, 11 Feb 2014 00:28:56 +0000 (UTC) Received: from mail0.glenbarber.us (mail0.glenbarber.us [208.86.227.67]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A149C1AFA; Tue, 11 Feb 2014 00:28:56 +0000 (UTC) Received: from glenbarber.us (c-71-224-221-174.hsd1.nj.comcast.net [71.224.221.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gjb) by mail0.glenbarber.us (Postfix) with ESMTPSA id 3066421136; Tue, 11 Feb 2014 00:28:55 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.8.3 mail0.glenbarber.us 3066421136 Authentication-Results: mail0.glenbarber.us; dkim=none reason="no signature"; dkim-adsp=none Date: Mon, 10 Feb 2014 19:28:53 -0500 From: Glen Barber To: Dave Mischler Subject: Re: Is "nc" broken in 10.0? Message-ID: <20140211002853.GL1629@glenbarber.us> References: <1392077771.9826.4.camel@barrel.mischler.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="M9YpAf2t6OxtMGzg" Content-Disposition: inline In-Reply-To: <1392077771.9826.4.camel@barrel.mischler.com> X-Operating-System: FreeBSD 11.0-CURRENT amd64 User-Agent: Mutt/1.5.22 (2013-10-16) Cc: freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 00:28:56 -0000 --M9YpAf2t6OxtMGzg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 10, 2014 at 07:16:11PM -0500, Dave Mischler wrote: > the 'nc' program doesn't seem to close the network connection anymore > when it reaches EOF. This worked fine in 9.x. Can somebody else > confirm this broken behavior? >=20 > Example: >=20 > On one session, listen for an incoming connection: >=20 > % nc -l 5101 >=20 > On another session, open an outgoing connection, then close the input: >=20 > % nc 127.0.0.1 5101 > ^D >=20 > The session will not close. It doesn't seem to matter if the input is a > terminal, file, pipe, or whatever else you can think of. >=20 I think you want the '-N' flag. ------------------------------------------------------------------------ r249499 | delphij | 2013-04-15 01:31:59 -0400 (Mon, 15 Apr 2013) | 8 lines MFV r249496,249498. The most visible change is that we no longer shuts down the connection when stdin closes, by default. This matches Hobbit's original netcat and GNU netcat. Old behavior can be restored with the new -N flag. ------------------------------------------------------------------------ Glen --M9YpAf2t6OxtMGzg Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBCAAGBQJS+W7FAAoJELls3eqvi17Qm74P/RKnNZe344U9ao6LTmNYQ4hr rZ2zT79EL5pxG0xfrDUeWJAinAT/VIO5ciAaDAvaQdl/jdQ/wR0QZz3Q4TTycHK2 SB2t4dWycSOCcsDTKwxe9eeArf5HwHmocF0TS+oeR7UxJMCDScoDAKpnaV0Ncpom Du0Btk0KLku1kh+HD19rtwU1K8tf1K9bdU5Wy44sp9FemmvgaqqQ2ihWxWxOA0H5 i+j+WEryWePFJuySsxLicOLVGMXA1fpTtuMS6h1S10IgX/sD4wzIg2XYzEB3HD7B 6iFtH2QjC71KtEt9/70gBMqXK/gig3amuZ6i7abTl2N02ERm0Nl+FvTnJUy9R+99 l0oPA7QexH2J9zcOzhY4Js+ONoo7SDwH4tneIcHCniY+VA6/JLTvc9gkHRJUD3uD 9BxtBsbFGUACi67BT8cwIwwAiS3KCanauSqmpMysYI5j74hMuqxB/9rP6j0+yamK L7HetMhCBHsBOklFW/bnyk2QOzMfSYBL6eaEsdr3PKCFMIvQVGB2ckL85VyTYKzG OmQYhNcgF69R7pnX0uajUYFGAactWcJRY/nZ1uO5uOLbnoLpTEsL4peUsisvQWfN IuVX12qKLS4EGaSzIobin9sQTZfudbe232FNdrHMpGBS6xB5HS05av7OVrOizhpH yhyWKspdbxGnaghGD0fO =a7ux -----END PGP SIGNATURE----- --M9YpAf2t6OxtMGzg--