aboutsummaryrefslogtreecommitdiffstats
path: root/man3
diff options
context:
space:
mode:
authorAlejandro Colomar <alx.manpages@gmail.com>2021-03-06 00:51:03 +0100
committerMichael Kerrisk <mtk.manpages@gmail.com>2021-03-07 11:16:21 +0100
commita2471dc6901db757d6c0f11c57a6e6fc1c0783eb (patch)
tree5245628509199b2bb662026462cb1caa4d1bd0fc /man3
parent6d512409dfa7cf29138b51326eba0ae941a45d62 (diff)
downloadman-pages-a2471dc6901db757d6c0f11c57a6e6fc1c0783eb.tar.gz
posix_spawn.3: SYNOPSIS: Use 'restrict' in prototypes
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> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man3')
-rw-r--r--man3/posix_spawn.39
1 files changed, 5 insertions, 4 deletions
diff --git a/man3/posix_spawn.3 b/man3/posix_spawn.3
index a56aa3e86a..02f86fddd3 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 ,