- Oct 06, 2017
-
-
Colin Walters authored
I'd like to have the checks for `EBADF` as well as the "assign to -1" in more places. The cleanup function we had for `glnx_fd_close` is actually what we want. Let's rename the cleanup macro to `glnx_autofd` to better match other autocleanups like `g_autofree`. Then we can use `glnx_fd_close()` as a replacement for plain Unix `close()`. I left the `glnx_close_fd` macro, but it's obviously confusing now with the former. We'll eventually remove it.
-
- Jul 31, 2017
-
-
Colin Walters authored
We should be able to rely upstream on everything *except* `glnx_unref_object` which requires the library itself to depend on a newer glib, which isn't true for e.g. RHEL7 libsoup. libostree was almost ready for this; just a few patches to push it to completion in https://github.com/ostreedev/ostree/pull/1042
-
- Jul 26, 2017
-
-
Colin Walters authored
systemd does this by default. I think we should treat this as a fatal error since it can cause really painful-to-debug problems if we don't just get EBADF but actually close something else's fd due to a race.
-
- Apr 21, 2017
-
-
Philip Withnall authored
In general, all FDs < 0 are invalid (and should not have close() called on them), so check that. This could have caused problems if a function returned an error value < -1. Signed-off-by:
Philip Withnall <withnall@endlessm.com>
-
- Mar 10, 2016
-
-
Alexander Larsson authored
We're ignoring the result from the close, but it can still affect errno, which is bad if you use this in functions that sets errno, because errno can unexpectedly change after you've set it.
-
- Dec 11, 2015
-
-
Alexander Larsson authored
This is very useful in combination with glnx_close_fd https://bugzilla.gnome.org/show_bug.cgi?id=757611
-
- Feb 14, 2015
-
-
Colin Walters authored
This module is a new successor to libgsystem. It currently contains a backport of the GLib cleanup macros, but soon more Linux-specific code will be added.
-