Skip to content
Snippets Groups Projects
  1. Oct 06, 2017
    • Colin Walters's avatar
      Add glnx_fd_close() and glnx_autofd · 97cd6a6c
      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.
      97cd6a6c
  2. Jul 31, 2017
  3. Jul 26, 2017
  4. Apr 21, 2017
  5. Mar 10, 2016
    • Alexander Larsson's avatar
      Don't touch errno in glnx_fd_close · 69d8a597
      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.
      69d8a597
  6. Dec 11, 2015
  7. Feb 14, 2015
Loading