From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) by sourceware.org (Postfix) with ESMTPS id B15753858D35 for ; Wed, 29 Dec 2021 16:59:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B15753858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qk1-x731.google.com with SMTP id w27so14312908qkj.7 for ; Wed, 29 Dec 2021 08:59:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=f/ZKKrzq2Byq9d93uzyA1SfNpS9luA5vRdZZnWj5XOI=; b=MOsAJnafa2Y9kKRoWzQgwMptja0Fv8ufkFgQ9W8ci2GDaxDe8XSxvWmdmj7HTyxIIW RVxnvGKwbjaJ/8L3AGolsyi5rWiehfEFjzP0ge/SWEIgFAmWz8t5lmLzAJNhl8CfP960 6ESqCTpkGkCPTPzJuVxfRlio0tgBMNTJz1prpbQm882ZnE+4dvN6btFtWIkEurNXSO4J dCxV6w7TkXwJRgqbulV87Ubqls90cpoeamJRd7xujYUOuiaa/ZCQQCHJZuYa3elaDfOG iFMd+pPkRqomfrZMtTnxzO9uEIVPGopQRgYosRDlmhCTXw9bIs6FOIfeyT251xrIrXLM BU7w== 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; bh=f/ZKKrzq2Byq9d93uzyA1SfNpS9luA5vRdZZnWj5XOI=; b=udsr3fns3yKDyyKLlX5+yZl8+B4tn7H71OuimH+DtjPRJcwXGyB61CmJzl1e/b55hq T85uOIAOoTOTOaRFrmoy83NRF3wvZuR7aSVRPY3Tt0d4TYcJQAgamm/ozOl7xzRSYHZV 8Od3HjoZK90wUhPDZrU1FE97jsNHpx48DjZasZnIkMxCW4lD8PkiVqbVNHJiGEodh5VX pFP1cTLUfxeGWVAj91AjPGw0mpV8FRqvYvAQH0trDJhdnci9mp3BsFdIEPCHDYn2t8Cd SSF1BJ9M8CUSMDHXPU3cdHGRdG+U4rYO+Jckug9HhkXp+cGBartqQkvhkUhtOIlpddIL B1+w== X-Gm-Message-State: AOAM532epPd8UO9/Y7Wy8wdg8g0lJ6r9KmYG3jrpvRvvdBC7oWimWK9T 7kFp6Fi3NadZVUyaOjh4tyc3l3U4L2hUHZQnneBFsuYt2Q== X-Google-Smtp-Source: ABdhPJyeFMiyuT2UCdKstKUFLpEggi22gSnUHMn2bCkf1MnCXbJkf09UMhyfSJwQDcToj+n7U8cF3++3M4hhisrHX0E= X-Received: by 2002:a05:620a:2894:: with SMTP id j20mr18944261qkp.162.1640797169202; Wed, 29 Dec 2021 08:59:29 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: C Howland Date: Wed, 29 Dec 2021 11:59:18 -0500 Message-ID: Subject: Re: Fw: Error in posix_spawn(3) man page To: newlib@sourceware.org X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Dec 2021 16:59:32 -0000 > > > ------------------------------ > *From:* Newlib on > behalf of Keith Thompson > *Sent:* Tuesday, December 28, 2021 10:24 PM > *To:* newlib@sourceware.org > *Cc:* Keith Thompson > *Subject:* Error in posix_spawn(3) man page > > > > The posix_spawn(3) man page has incorrect types for the argv and > envp parameters for the posix_spawn and posix_spawnp functions. > > They're shown as > char *const argv, char *const envp > when they should be > char *const argv[], char *const envp[] > > Suggested patch (though I'm not 100% sure how the square brackets > are handled when generating the man page): > > diff --git newlib/libc/posix/posix_spawn.c newlib/libc/posix/posix_spawn.c > index 005471fde..85bfa6477 100644 > --- newlib/libc/posix/posix_spawn.c > +++ newlib/libc/posix/posix_spawn.c > @@ -39,11 +39,11 @@ SYNOPSIS > int posix_spawn(pid_t *<[pid]>, const char *<[path]>, > const posix_spawn_file_actions_t *<[file_actions]>, > const posix_spawnattr_t *<[attrp]>, > - char *const <[argv]>, char *const <[envp]>); > + char *const <[argv]>[], char *const <[envp]>[]); > int posix_spawnp(pid_t *<[pid]>, const char *<[file]>, > const posix_spawn_file_actions_t *<[file_actions]>, > const posix_spawnattr_t *<[attrp]>, > - char *const <[argv]>, char *const <[envp]>); > + char *const <[argv]>[], char *const <[envp]>[]); > > DESCRIPTION > Use <> and <> to create a new child process > > ------------------------------ > > The square brackets as done here will work as intended (_execve_r() is done exactly like this). Patch looks good (both for the doc viewpoint and for the stated intent of making it match POSIX). Craig