mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-10 03:04:05 +02: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:
@@ -1845,6 +1845,10 @@ g_close (gint fd,
|
|||||||
* anything.
|
* anything.
|
||||||
* In both cases, set @fd_ptr to `-1` before returning.
|
* 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
|
* It is a programming error for @fd_ptr to point to a non-negative
|
||||||
* number that is not a valid file descriptor.
|
* number that is not a valid file descriptor.
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user