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: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (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 145871F8C6 for ; Thu, 8 Jul 2021 21:55:39 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E28D03888C42 for ; Thu, 8 Jul 2021 21:55:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E28D03888C42 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1625781337; bh=tAZST1WjqtLRuUHiQofP5d3WZxK8ReIQTMXidAasNB0=; h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=NYOiFSaE/BBLWxrLDDh2JKRGGipKXWhLrzt7Yb0Rei4aL+pM3a6xrkNbV0Og4iI9V p7Nlqosvw5pKSZuNszQpQC1VteRnNtmh/Q4N/Lv9y2Bc+G+vabkTBTRibbpX1T08z0 4SmXT7dtsAPdq83jkr63OuHuPaFWE95X/E46iVHg= Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by sourceware.org (Postfix) with ESMTPS id B8074385781B for ; Thu, 8 Jul 2021 21:55:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B8074385781B Received: by mail-pg1-x532.google.com with SMTP id u14so7803542pga.11 for ; Thu, 08 Jul 2021 14:55:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tAZST1WjqtLRuUHiQofP5d3WZxK8ReIQTMXidAasNB0=; b=NgAChk7ltJLDemGYawvjn7NuhOzY6me/7YG2QEK+mDww2xthqIOarQdlnVngg5ZA8P 2z+TmAwC0cdDrfRK1JGM7spg4BRb0eXOvMAmQOdTnx/wzIyO/PX2q/31jJB/fciLs4+q ZGtxFc0rVU4MEakfCtN0CgSocyt0yNHPkZMv27FctBCzEUSHM77fG2lq5fALqZoJ8hAc wmLxkmqdm4OA2WOwAimqNVq9xl8h9XBtA8vpfhtgv2juvKLcfAg3zsZMdTCRWEEpym9H av8PT6C8y3ltbp1s0+gLaj85tGhqnjencMwKQIqyIgmCiYnKNlE019A9dvwzTKbUFRUO smpQ== X-Gm-Message-State: AOAM530rBXFKxTYK9HTkiSLiMSn0add/d2PmzSLB7oJzQ/EuF09Xt0e0 sPIGW60bpUhX2UNQ6kBk2NubiJ/fSck47JLeeivUXA7P39U= X-Google-Smtp-Source: ABdhPJwBTkFb+UqDCwm/AHSLVBVPnct+SMVPm9cZst7MsYYyyaGmr4SZ0tD5bQay5iFupDjo5BrOwLz14XvReeELBuw= X-Received: by 2002:a63:5b02:: with SMTP id p2mr34154884pgb.161.1625781316791; Thu, 08 Jul 2021 14:55:16 -0700 (PDT) MIME-Version: 1.0 References: <20210706145839.1658623-1-adhemerval.zanella@linaro.org> <20210706145839.1658623-5-adhemerval.zanella@linaro.org> <87pmvsswkx.fsf@oldenburg.str.redhat.com> <3fcf5bc3-30b8-25a3-896b-7ca11c4c4bf8@linaro.org> In-Reply-To: <3fcf5bc3-30b8-25a3-896b-7ca11c4c4bf8@linaro.org> Date: Thu, 8 Jul 2021 14:54:41 -0700 Message-ID: Subject: Re: [PATCH v7 4/4] posix: Add posix_spawn_file_actions_addclosefrom_np To: Adhemerval Zanella Content-Type: text/plain; charset="UTF-8" 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: "H.J. Lu via Libc-alpha" Reply-To: "H.J. Lu" Cc: Florian Weimer , Adhemerval Zanella via Libc-alpha Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" On Thu, Jul 8, 2021 at 9:12 AM Adhemerval Zanella via Libc-alpha wrote: > > > > On 08/07/2021 11:34, Florian Weimer wrote: > > Some of the new files use: > > > >> + . */ > > > > That should be: https:// > > Ack. > > > > >> +/* Called on process re-execution. The arguments are the expected opened > >> + file descriptors. */ > >> +_Noreturn static void > >> +handle_restart (int argc, char *argv[]) > >> +{ > >> + size_t nfds = argc > 1 ? argc - 1 : 0; > >> + struct fd_t > >> + { > >> + int fd; > >> + _Bool found; > >> + } *fds = xmalloc (sizeof (struct fd_t) * nfds); > >> + for (int i = 0; i < nfds; i++) > >> + { > >> + char *endptr; > >> + long unsigned int fd = strtoul (argv[i+1], &endptr, 10); > >> + if (*endptr != '\0' || fd > INT_MAX) > >> + FAIL_EXIT1 ("readdir: invalid file descriptor value: %s", argv[i]); > > > > Should be: > > > > FAIL_EXIT1 ("argv[%d]: invalid file descriptor value: %s", i, argv[i]); > > Ack. > > > > >> @@ -344,7 +346,9 @@ __spawnix (pid_t * pid, const char *file, > >> /* We need at least a few pages in case the compiler's stack checking is > >> enabled. In some configs, it is known to use at least 24KiB. We use > >> 32KiB to be "safe" from anything the compiler might do. Besides, the > >> - extra pages won't actually be allocated unless they get used. */ > >> + extra pages won't actually be allocated unless they get used. > >> + It also acts the slack for spawn_closefrom (including MIPS64 getdents64 > >> + where it might use about 1k extra stack space. */ > > > > Missing closing parenthesis. > > > > Rest looks okay to me, thanks. No need to post a new verison, I think. > > Thanks, I will respin another round of tests and commit. On x86-64, I saw: FAIL: posix/tst-spawn5 https://sourceware.org/bugzilla/show_bug.cgi?id=28067 Has anyone else seen it? -- H.J.