Add misc. doccomments
All checks were successful
Build and test / check-license (push) Successful in 1m42s
Build and test / check (push) Successful in 1m50s
Build and test / build (push) Successful in 2m38s
Build and test / test (push) Successful in 4m44s
Build and test / docs (push) Successful in 6m1s

This commit is contained in:
2025-12-16 19:33:11 +09:00
parent 97908ce887
commit dfe20826c1
2 changed files with 18 additions and 1 deletions

View File

@@ -176,6 +176,8 @@ pub fn drop_privs() -> anyhow::Result<()> {
Ok(())
}
/// Bootstrap an internal server by forking a child process to run the server, giving it
/// the other half of a Unix socket pair to communicate with the client process.
fn bootstrap_internal_server_and_drop_privs(
config_path: Option<PathBuf>,
) -> anyhow::Result<StdUnixStream> {
@@ -237,6 +239,10 @@ fn invoke_server_with_config(config_path: PathBuf) -> anyhow::Result<StdUnixStre
}
}
/// Construct a MySQL connection pool that consists of exactly one connection.
///
/// This is used for the internal server in SUID/SGID mode, where the server session
/// only ever will get a single client.
async fn construct_single_connection_mysql_pool(
config: &MysqlConfig,
) -> anyhow::Result<sqlx::MySqlPool> {
@@ -262,8 +268,10 @@ async fn construct_single_connection_mysql_pool(
Ok(pool)
}
/// Run the server in the forked child process.
/// Run a single server session in the forked process.
///
/// This function will not return, but will exit the process with a success code.
/// The function assumes that it's caller has already forked the process.
fn run_forked_server(
config_path: PathBuf,
server_socket: StdUnixStream,