From 8b4f212e09bd3b7910f69ce3f33162090961a5a7 Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@collabora.com>
Date: Tue, 7 Jan 2020 20:24:12 +0000
Subject: [PATCH] SrtSystemInfo: Document that we need SIGCHLD

Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 steam-runtime-tools/system-info.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/steam-runtime-tools/system-info.c b/steam-runtime-tools/system-info.c
index 016269b8d..29bfd401f 100644
--- a/steam-runtime-tools/system-info.c
+++ b/steam-runtime-tools/system-info.c
@@ -66,6 +66,14 @@
  * Other threads may create their own parallel #SrtSystemInfo object and
  * use that instead, if desired.
  *
+ * The majority of the #SrtSystemInfo API involves child processes, and
+ * requires `SIGCHLD` to be handled (somehow) by the host process:
+ * `SIGCHLD` must not have been ignored (by `sigaction(2)` with `SIG_IGN`)
+ * or blocked (for example with `sigprocmask(2)`) in the thread that is
+ * acting on the #SrtSystemInfo. If this cannot be guaranteed, please run
+ * `steam-runtime-system-info(1)` as a child process and inspect its
+ * JSON output instead of calling library functions directly.
+ *
  * Ownership can be transferred to other threads by an operation that
  * implies a memory barrier, such as g_atomic_pointer_set() or
  * g_object_ref(), but after this is done the previous owner must not
-- 
GitLab