From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Florian Weimer Newsgroups: gmane.comp.lib.glibc.alpha Subject: Re: RFC V2 [1/2] test-in-container Date: Wed, 28 Feb 2018 13:56:04 +0100 Message-ID: <9690b641-d241-422d-f38a-0283bea523b9@redhat.com> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1519822451 4701 195.159.176.226 (28 Feb 2018 12:54:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 28 Feb 2018 12:54:11 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 To: DJ Delorie , libc-alpha@sourceware.org Original-X-From: libc-alpha-return-90677-glibc-alpha=m.gmane.org@sourceware.org Wed Feb 28 13:54:06 2018 Return-path: Envelope-to: glibc-alpha@blaine.gmane.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=vFqzS43bcZ+X2/hr Igek0LraZSmojiU8hOD89MCtJfLzUdvFJNdklaIiVGvSQ/dRTrr/xBggivTDRpjS K4PoeKkmt5IPMop3CiFbjM1yJF5TJvUoJJExjWtFLQTjaCytFfRwCFRwolmlWXBK +C/b9lkxAqZKyLEMr/Et3xc7wBU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=suNZbl1YSX7ew7NRMaQ+cP Jn9uE=; b=xLkBaZr3oQIbjRshvJZMFqdkj1ZA3LB5iDWKjb4G3ri/OejWu1ek2w P2bVhC367wVstCWUhzzEYjlg8TvSWpShPMuJncCcGHYaxHf5D26r0g39vBilaYvs UfRIU43swlxbMSOeWmUm+Ep+wdVsCK05z7sbmBNOxbMvHjvr4CvV4= Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Original-Sender: libc-alpha-owner@sourceware.org Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com In-Reply-To: Xref: news.gmane.org gmane.comp.lib.glibc.alpha:83008 Archived-At: Received: from server1.sourceware.org ([209.132.180.131] helo=sourceware.org) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1er1FF-0000bL-S8 for glibc-alpha@blaine.gmane.org; Wed, 28 Feb 2018 13:54:06 +0100 Received: (qmail 123721 invoked by alias); 28 Feb 2018 12:56:09 -0000 Received: (qmail 123710 invoked by uid 89); 28 Feb 2018 12:56:07 -0000 On 02/27/2018 09:33 PM, DJ Delorie wrote: > + while ((rsz = read (sfd, buf, 512)) > 0) > + write (dfd, buf, rsz); This needs error checking, and you can use copy_file_range. Thanks, Florian