Skip to content
Snippets Groups Projects
  1. Oct 16, 2017
  2. 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
  3. Sep 25, 2017
    • Colin Walters's avatar
      lockfile: Use an `initialized` member rather than explicit init · 32a42931
      Colin Walters authored
      This makes us more friendly to being embedded in a GObject or
      the like that's fully zero-initialized, rather than relying on the special
      `-1` value for the fd.
      
      Calls to `glnx_release_lock_file()` become idempotent, so it's easy to call it
      unconditionally in an object finalizer.
      32a42931
  4. Sep 13, 2017
  5. Apr 25, 2017
  6. Jun 28, 2016
  7. May 05, 2015
Loading