From patchwork Fri Mar 5 23:51:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1448314 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=XrAQm1pE; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4Dsl0T6sHgz9sVt for ; Sat, 6 Mar 2021 10:52:41 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A43D9399F01F; Fri, 5 Mar 2021 23:51:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A43D9399F01F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1614988294; bh=ziriBOqKNZ9d4xO2UDwSKTeAENeQ3dZSV2nMSKavWl0=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=XrAQm1pEzfP7QxObNMygkAysFWGBQy3mtCSZPo0CrBW3IG72CFAY4ndR3zVBtschf Khmu4QCQXXdO8w2wHFgPqvUUnVSTDglus+lovO0+1UYr5uGsIrz6dql1gGtiJH5ups kETbdpOjgfSAqsXgf7ryN/ceEr/g4SpboZF2l3lg= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by sourceware.org (Postfix) with ESMTPS id D6AD6399F009 for ; Fri, 5 Mar 2021 23:51:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D6AD6399F009 Received: by mail-wm1-x32f.google.com with SMTP id n22so2668058wmc.2 for ; Fri, 05 Mar 2021 15:51:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ziriBOqKNZ9d4xO2UDwSKTeAENeQ3dZSV2nMSKavWl0=; b=RaxOuDOIO2H3U00a5fSL80eZI4cJxUvmk4NBpzpLaMBUuFEteow1EnBrfk8FYDbpW3 bqXqdk58q6exEZA66dLNEuM0Ij6hA6nMV7xoSKTQsQQDbi+rDGE2ZSMa7UgOwQsGgK4p A0mCNL/CtT1TEndVdTo/iKTLSoLC+yYAYfH9aGmuR2xGm0WLttXrMUpVvVC6bqk8Ntm7 C01401Y14DxwCfBXl4mcoFhj1M8pRxE2ygYLlIKo3cfVEUlrmVilWGXHIKPZPkARQvA/ YPkOerIjyVxrUKPwFWFqBf6lC0tII++ZaCOZcoiSJ+F+lxgF/LACNQmX89RTRebfC97Y pP/Q== X-Gm-Message-State: AOAM530A3JG2l+WC/lK+yP+hBcSRJWn+jbkCfTGZMUEH2yuNYpGHZOaL r27SCEhvFpjjWiUDUL5eWFY= X-Google-Smtp-Source: ABdhPJyO/a+vgchjGIKhrt6dGIL2qw6yOqq5BF3KO/hBEkdK/rrly6uLyNiHBukh8O2liq5RXHSRFw== X-Received: by 2002:a7b:c35a:: with SMTP id l26mr9399179wmj.104.1614988291059; Fri, 05 Mar 2021 15:51:31 -0800 (PST) Received: from localhost.localdomain ([170.253.51.130]) by smtp.googlemail.com with ESMTPSA id f7sm7219835wrm.36.2021.03.05.15.51.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 15:51:30 -0800 (PST) To: mtk.manpages@gmail.com Subject: [PATCH 19/22] posix_spawn.3: SYNOPSIS: Use 'restrict' in prototypes Date: Sat, 6 Mar 2021 00:51:03 +0100 Message-Id: <20210305235105.177359-20-alx.manpages@gmail.com> X-Mailer: git-send-email 2.30.1.721.g45526154a5 In-Reply-To: <20210305235105.177359-1-alx.manpages@gmail.com> References: <20210305235105.177359-1-alx.manpages@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org 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: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, "G . Branden Robinson" , libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Both POSIX and glibc use 'restrict' in posix_spawn(). Let's use it here too. .../glibc$ grep_glibc_prototype posix_spawn posix/spawn.h:72: extern int posix_spawn (pid_t *__restrict __pid, const char *__restrict __path, const posix_spawn_file_actions_t *__restrict __file_actions, const posix_spawnattr_t *__restrict __attrp, char *const __argv[__restrict_arr], char *const __envp[__restrict_arr]) __nonnull ((2, 5)); .../glibc$ I conciously did an exception with respect to the right margin of the rendered page. Instead of having the right margin at 78 as usual (per Branden's recommendation), I let it use col 79 this time, to avoid breaking the prototype in an ugly way, or shifting all of the parameters to the left, unaligned with respect to the function parentheses. Cc: G. Branden Robinson Signed-off-by: Alejandro Colomar --- man3/posix_spawn.3 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/man3/posix_spawn.3 b/man3/posix_spawn.3 index a56aa3e86..02f86fddd 100644 --- a/man3/posix_spawn.3 +++ b/man3/posix_spawn.3 @@ -35,10 +35,11 @@ posix_spawn, posix_spawnp \- spawn a process .nf .B #include .PP -.BI "int posix_spawn(pid_t *" pid ", const char *" path , -.BI " const posix_spawn_file_actions_t *" file_actions , -.BI " const posix_spawnattr_t *" attrp , -.BI " char *const " argv[] ", char *const " envp[] ); +.BI "int posix_spawn(pid_t *restrict " pid ", const char *restrict " path , +.BI " const posix_spawn_file_actions_t *restrict " file_actions , +.BI " const posix_spawnattr_t *restrict " attrp , +.BI " char *const " argv [restrict], +.BI " char *const " envp [restrict]); .BI "int posix_spawnp(pid_t *" pid ", const char *" file , .BI " const posix_spawn_file_actions_t *" file_actions , .BI " const posix_spawnattr_t *" attrp ,