1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:07:45 +00:00

Help+Base: Add help://man URLs for links between man pages

The URLs of the form `help://man/<section>/<page>` link to another help
page inside the help application. All previous relative page links are
replaced by this new form. This doesn't change any behavior but it looks
much nicer :^)

Note that man doesn't handle these new links, but the previous relative
links didn't work either.
This commit is contained in:
kleines Filmröllchen 2022-01-07 14:15:44 +01:00 committed by Linus Groh
parent becf74097e
commit 98c0c5e9e6
73 changed files with 177 additions and 165 deletions

View file

@ -50,4 +50,4 @@ int main()
## See also
* [`dirname`(3)](dirname.md)
* [`dirname`(3)](help://man/3/dirname)

View file

@ -51,4 +51,4 @@ int main()
## See also
* [`basename`(3)](basename.md)
* [`basename`(3)](help://man/3/basename)

View file

@ -27,7 +27,7 @@ int getopt_long(int argc, char** argv, const char* short_options, const struct o
## Description
`getopt()` and `getopt_long()` parse options according to the syntax specified
in [`getopt`(5)](../man5/getopt.md). `getopt()` only supports short options;
in [`getopt`(5)](help://man/5/getopt). `getopt()` only supports short options;
`getopt_long()` supports both short and long options.
One invocation of either function extracts at most one option from command line
@ -150,4 +150,4 @@ const char* file_name = argv[optind];
## See also
* [`getopt`(5)](../man5/getopt.md)
* [`getopt`(5)](help://man/5/getopt)

View file

@ -19,7 +19,7 @@ The *flags* argument accepts a bitmask of the following flags:
* `O_RDWR`: Open for both reading and writing.
* `O_NOCTTY`: The opened pseudo-terminal will not be made the controlling TTY for the process.
* `O_CLOEXEC`: The opened fd shall be closed on [`exec`(2)](../man2/exec.md).
* `O_CLOEXEC`: The opened fd shall be closed on [`exec`(2)](help://man/2/exec).
## Return value
@ -27,8 +27,8 @@ On success, a pseudo-terminal device is allocated and `posix_openpt()` returns a
## Errors
Returns the same errors as [`open`(2)](../man2/open.md).
Returns the same errors as [`open`(2)](help://man/2/open).
## See also
* [`open`(2)](../man2/open.md)
* [`open`(2)](help://man/2/open)

View file

@ -21,15 +21,15 @@ If `executable_path` passed to `posix_spawn` is a relative path, it is resolved
If `executable_path` passed to `posix_spawnp` is a relative path, it is resolved by searching through directories specified in the `PATH` environment variable.
The `posix_spawn_file_actions_t` and `posix_spawnattr_t` arguments may be `nullptr`. If they aren't, see [`posix_spawn_file_actions`(2)](posix_spawn_file_actions_init.md) and [`posix_spawnattr`(2)](posix_spawnattr_init.md) for what they do.
The `posix_spawn_file_actions_t` and `posix_spawnattr_t` arguments may be `nullptr`. If they aren't, see [`posix_spawn_file_actions`(2)](help://man/3/posix_spawn_file_actions_init) and [`posix_spawnattr`(2)](help://man/3/posix_spawnattr_init) for what they do.
The last entry in `argv` and `envp` has to be `nullptr`.
The new process is started as if the following steps are executed in this order:
1. A new process is started as if `fork()` was called.
2. If the `posix_spawnattr_t` parameter is non-nullptr, it [takes effect](posix_spawnattr_init.md).
3. If the `posix_spawn_file_actions_t` parameter is non-nullptr, it [takes effect](posix_spawn_file_actions_init.md).
2. If the `posix_spawnattr_t` parameter is non-nullptr, it [takes effect](help://man/3/posix_spawnattr_init).
3. If the `posix_spawn_file_actions_t` parameter is non-nullptr, it [takes effect](help://man/3/posix_spawn_file_actions_init).
4. `executable_path` is loaded and starts running, as if `execve` or `execvpe` was called.
## Return value
@ -62,5 +62,5 @@ int main()
## See also
* [`posix_spawnattr`(2)](posix_spawnattr_init.md)
* [`posix_spawn_file_actions`(2)](posix_spawn_file_actions_init.md)
* [`posix_spawnattr`(2)](help://man/3/posix_spawnattr_init)
* [`posix_spawn_file_actions`(2)](help://man/3/posix_spawn_file_actions_init)

View file

@ -21,7 +21,7 @@ int posix_spawn_file_actions_addopen(posix_spawn_file_actions_t*, int fd, const
## Description
Configure a `posix_spawn_file_actions_t` object for use with [`posix_spawn`(2)](posix_spawn.md). This object can be used to let `posix_spawn()` set up file-related state for the spawned child process. The file actions are executed after creating the the new process but before loading its binary in the order they were added to the `posix_spawn_file_actions_t` object.
Configure a `posix_spawn_file_actions_t` object for use with [`posix_spawn`(2)](help://man/3/posix_spawn). This object can be used to let `posix_spawn()` set up file-related state for the spawned child process. The file actions are executed after creating the the new process but before loading its binary in the order they were added to the `posix_spawn_file_actions_t` object.
A `posix_spawn_file_actions_t` object is allocated on the stack but starts in an undefined state.
@ -47,4 +47,4 @@ If the effect of a file action fails, the child will exit with exit code 127 bef
## See also
* [`posix_spawn`(2)](posix_spawn.md)
* [`posix_spawn`(2)](help://man/3/posix_spawn)

View file

@ -36,7 +36,7 @@ int posix_spawnattr_setsigmask(posix_spawnattr_t*, const sigset_t*);
## Description
Configures a `posix_spawnattr_t` object for use with [`posix_spawn`(2)](posix_spawn.md). This object can be used to let `posix_spawn()` set up process attributes for the spawned child process. The file actions are executed after creating the new process but before loading its binary.
Configures a `posix_spawnattr_t` object for use with [`posix_spawn`(2)](help://man/3/posix_spawn). This object can be used to let `posix_spawn()` set up process attributes for the spawned child process. The file actions are executed after creating the new process but before loading its binary.
A `posix_spawnattr_t` object is allocated on the stack but starts in an undefined state.
@ -48,7 +48,7 @@ It is valid to alternatingly call `posix_spawnattr_init()` and `posix_spawnattr_
`posix_spawnattr_setflags()` configures which attributes of the new child process `posix_spawn()` will set. It receives a bitmask that can contain:
* `POSIX_SPAWN_RESETIDS`: If set, `posix_spawn()` will reset the effective uid and gid of the child process to the real uid and gid of the parent process. See also [`setuid_overview`(7)](../man7/setuid_overview.md).
* `POSIX_SPAWN_RESETIDS`: If set, `posix_spawn()` will reset the effective uid and gid of the child process to the real uid and gid of the parent process. See also [`setuid_overview`(7)](help://man/7/setuid_overview).
* `POSIX_SPAWN_SETPGROUP`: If set, `posix_spawn()` will set the process group ID of the child process to the process group ID configured with `posix_spawnattr_setpgroup()`, as if `setpgid(0, pgroup)` was called in the child process. The behavior if both this and `POSIX_SPAWN_SETSID` is set is undefined.
@ -75,4 +75,4 @@ If the effect of an attr fails, the child will exit with exit code 127 before ev
## See also
* [`posix_spawn`(2)](posix_spawn.md)
* [`posix_spawn`(2)](help://man/3/posix_spawn)