-
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.
Colin Walters authoredI'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.