gstdio: Improve documentation of g_clear_fd() as async-signal safe

Add cross-references as requested for similar new API in !3457.

Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie 2023-05-31 16:24:28 +01:00
parent 9af6b7e4e7
commit 0d86ee0a86

View File

@ -1856,8 +1856,13 @@ g_close (gint fd,
* stored in both %errno and @error. If this function succeeds,
* %errno is undefined.
*
* This function is async-signal-safe if @error is %NULL and @fd_ptr
* points to either a negative number or a valid file descriptor.
* On POSIX platforms, this function is async-signal safe
* if @error is %NULL and @fd_ptr points to either a negative number or a
* valid open file descriptor.
* This makes it safe to call from a signal handler or a #GSpawnChildSetupFunc
* under those conditions.
* See [`signal(7)`](man:signal(7)) and
* [`signal-safety(7)`](man:signal-safety(7)) for more details.
*
* It is a programming error for @fd_ptr to point to a non-negative
* number that is not a valid file descriptor.