From c97348428fa1a23ff4625e77870f9dda33f1564c Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 30 May 2023 16:02:16 +0100 Subject: [PATCH] gmain: Document that g_steal_fd() preserves errno This is useful when writing similarly low-level code, and was always true as implemented here; let's document it so that other codebases can rely on it. Signed-off-by: Simon McVittie --- glib/gmain.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/glib/gmain.c b/glib/gmain.c index 1a753753c..fac14224a 100644 --- a/glib/gmain.c +++ b/glib/gmain.c @@ -6608,6 +6608,8 @@ g_get_worker_context (void) * [`signal-safety(7)`](man:signal-safety(7))), making it safe to call from a * signal handler or a #GSpawnChildSetupFunc. * + * This function preserves the value of `errno`. + * * Returns: the value that @fd_ptr previously had * Since: 2.70 */