diff mbox series

[19/22] posix_spawn.3: SYNOPSIS: Use 'restrict' in prototypes

Message ID 20210305235105.177359-20-alx.manpages@gmail.com
State Not Applicable
Headers show
Series man3: SYNOPSIS: Use 'restrict' in prototypes (batch 3) | expand

Commit Message

Alejandro Colomar \(man-pages\) March 5, 2021, 11:51 p.m. UTC
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 <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
 man3/posix_spawn.3 | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
diff mbox series

Patch

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 <spawn.h>
 .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 ,