mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-26 05:56:14 +01:00
gstdio: Document errno behaviour of g_clear_fd
g_clear_fd has the same interaction with errno as g_close or most libc functions: on success it has an unspecified effect on errno, and on failure (other than programming error) it sets errno to indicate the reason for failure. Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
parent
088d8b4359
commit
e231132fc3
@ -1845,6 +1845,10 @@ g_close (gint fd,
|
||||
* anything.
|
||||
* In both cases, set @fd_ptr to `-1` before returning.
|
||||
*
|
||||
* Like g_close(), if closing the file descriptor fails, the error is
|
||||
* stored in both %errno and @error. If this function succeeds,
|
||||
* %errno is undefined.
|
||||
*
|
||||
* It is a programming error for @fd_ptr to point to a non-negative
|
||||
* number that is not a valid file descriptor.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user