From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by sourceware.org (Postfix) with ESMTPS id 82E893858416 for ; Thu, 21 Oct 2021 18:15:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 82E893858416 Received: by mail-lj1-x234.google.com with SMTP id u5so1369959ljo.8 for ; Thu, 21 Oct 2021 11:15:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=r7Rp432Sx7H4TjXWUvgAohFcUcNv5fLmm4H6U2vJoXw=; b=2mzRycIAJOW4yYPPCA0WddsOOVFOGNoNhxo9sT7tK+hnLHGMk0W9PNwAd1vS7R7Usr srjgurIb3H3JV/vmUIio2ol7cVOHUFnqNRdXeMViGJQrDiI+Zgb9hShAYswvTTRbZrcq Ytmrrp8g66gnW+koj5P2sNtKu4aOqUU7sw4ufgqmZQw1w5Ht/Fpc8OFSY8y4bhkPkEbm 69vxFcPNPI44zYxSroc6eXAyKXtMmJ0HQgesN3cfuOJMpyDge1PUHcuEkiKgKtLL7Xpa iBKSIhCmCbXbZRP047TTCKFioPWOaTaoiKBpTjizdor0lg/JBjkJmp4dkHxjI2as3seV XJrg== X-Gm-Message-State: AOAM531OF9XWtDpYmXTTG9wu0JnN8YIp1y6UuQvaWYLy8f6h8kt6eNxB VrdvM6SqJiz/qMsryfs5pcGY8HFCB0Bo+BtkqcVR8w== X-Google-Smtp-Source: ABdhPJyhi0w7Rg6u3gaSk6BNvYK6NLdoaxjHHUG0eN1hXKIHQ9jpmCiDurQaRu09GQlOInTE8NS37ldqMpGl5e3pcFE= X-Received: by 2002:a05:651c:10e:: with SMTP id a14mr7519403ljb.73.1634840153988; Thu, 21 Oct 2021 11:15:53 -0700 (PDT) MIME-Version: 1.0 References: <88d036b7-5304-3673-318f-2ebc159c8b16@suse.cz> In-Reply-To: <88d036b7-5304-3673-318f-2ebc159c8b16@suse.cz> From: Ian Lance Taylor Date: Thu, 21 Oct 2021 11:15:42 -0700 Message-ID: Subject: Re: [PATCH] Handle jobserver file descriptors in btest. To: =?UTF-8?Q?Martin_Li=C5=A1ka?= Cc: gcc-patches@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-10.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, USER_IN_DEF_SPF_WL autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Oct 2021 18:15:57 -0000 On Thu, Oct 21, 2021 at 12:48 AM Martin Li=C5=A1ka wrote: > > The patch is about sensitive handling of file descriptors opened > by make's jobserver. Thanks. I think a better approach would be, at the start of main, fstat the descriptors up to 10 and record the ones for which fstat succeeds. Then at the end of main only check the descriptors for which fstat failed earlier. I can work on that at some point if you don't want to tackle it. Ian