From owner-svn-src-head@freebsd.org Tue Dec 5 13:44:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86051E6A4E1; Tue, 5 Dec 2017 13:44:20 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B1AF7B0E5; Tue, 5 Dec 2017 13:44:19 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id vB5Di937021710 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 5 Dec 2017 15:44:10 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua vB5Di937021710 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id vB5Di9Ig021709; Tue, 5 Dec 2017 15:44:09 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 5 Dec 2017 15:44:09 +0200 From: Konstantin Belousov To: Hans Petter Selasky Cc: rgrimes@freebsd.org, cem@freebsd.org, Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee Message-ID: <20171205134409.GV2272@kib.kiev.ua> References: <201712051258.vB5CwjQN051356@pdx.rh.CN85.dnsmgr.net> <22918eec-4c98-01e4-4c63-e145fbc6eab9@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <22918eec-4c98-01e4-4c63-e145fbc6eab9@selasky.org> User-Agent: Mutt/1.9.1 (2017-09-22) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 13:44:20 -0000 On Tue, Dec 05, 2017 at 02:00:00PM +0100, Hans Petter Selasky wrote: > On 12/05/17 13:58, Rodney W. Grimes wrote: > > Further more, why does freebsd need this in base? > > Hi, > > I think this is useful. It could replace the "-i " (intermediate) option > for "sed" for example. It avoids creating temporary files when filtering > files, right? No, if process fails during the operation, user data is destroyed irretrievable.The usual trick of creating temporary file and renaming ensure that old file is around until all data for new file is written into buffer cache. With some existing filesystem support, it also guarantees that the old file is around in case of the system crash. All this assuming the tool' code matches its description, which is not.