From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS17314 8.43.84.0/22 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, PDS_RDNS_DYNAMIC_FP,RCVD_IN_DNSWL_HI,RDNS_DYNAMIC,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id D02611F8C6 for ; Wed, 7 Jul 2021 12:53:36 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1022C395180D for ; Wed, 7 Jul 2021 12:53:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1022C395180D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1625662416; bh=N9z7tz6BlJo+PoFdVkp+5cnDtUJgKA5WMRsvClrk3/E=; h=To:Subject:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=Srad2gF3lnj45GYiJjC9fZhEvMZsmTIbWwqh1RG5k6O6NcX3ZzDhYnoEBDb/wexDf +Nfr0Kn3LgSsBI0JNMs1t2eMAs6AIlHMZ6TCKl8CyVsP4bXgu0shlML6UX9ezACmGH Kof4MuLJBAN/WntjTMwt857L5M0Fjy+h8/s+qbxM= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 439A13857434 for ; Wed, 7 Jul 2021 12:53:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 439A13857434 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-161-vusVvvsjPxqtCsTjUTgE7A-1; Wed, 07 Jul 2021 08:53:12 -0400 X-MC-Unique: vusVvvsjPxqtCsTjUTgE7A-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7D3C8804140; Wed, 7 Jul 2021 12:53:11 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-115-5.ams2.redhat.com [10.36.115.5]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A10D45D6A8; Wed, 7 Jul 2021 12:53:10 +0000 (UTC) To: Adhemerval Zanella Subject: Re: [PATCH v7 2/4] linux: Add close_range References: <20210706145839.1658623-1-adhemerval.zanella@linaro.org> <20210706145839.1658623-3-adhemerval.zanella@linaro.org> <87fswqa0eo.fsf@oldenburg.str.redhat.com> <9c726db9-9744-8030-a708-02454b8ecd26@linaro.org> Date: Wed, 07 Jul 2021 14:53:08 +0200 In-Reply-To: <9c726db9-9744-8030-a708-02454b8ecd26@linaro.org> (Adhemerval Zanella's message of "Wed, 7 Jul 2021 09:51:42 -0300") Message-ID: <871r8a8evf.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Florian Weimer via Libc-alpha Reply-To: Florian Weimer Cc: Adhemerval Zanella via Libc-alpha Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" * Adhemerval Zanella: > I changed it to the following, since afaiu kernel ignores gaps and our > fallback also ignore close return code. > > /* Close all file descriptors in the range FD up to MAX_FD. The flag FLAGS > are define by the CLOSE_RANGE prefix. This function behaves like close > on the range, but in a fail-safe where it will either fail and not close > any file descriptor or close all of them. Gaps where the file descriptor > is invalid are ignored. Returns 0 on successor or -1 for failure (and > sets errno accordingly). */ Okay, thanks for fine-tuning this. Florian