Skip to content
Snippets Groups Projects
  • Colin Walters's avatar
    0428fd87
    dirfd: Extend tmpdir API to support optional cleaning · 0428fd87
    Colin Walters authored
    We have a use case in libostree's staging dirs where we try to reuse
    them across multiple ostree txns, but we want the fd-relative bits
    here.
    
    Extend the tmpdir API to make deletion optional. While here, also extend the API
    to support checking for errors when deleting for projects like libostree that
    want to do so consistently.
    
    Also while here, add a change to set the fd to `-1` after clearing to be extra
    defensive.
    0428fd87
    History
    dirfd: Extend tmpdir API to support optional cleaning
    Colin Walters authored
    We have a use case in libostree's staging dirs where we try to reuse
    them across multiple ostree txns, but we want the fd-relative bits
    here.
    
    Extend the tmpdir API to make deletion optional. While here, also extend the API
    to support checking for errors when deleting for projects like libostree that
    want to do so consistently.
    
    Also while here, add a change to set the fd to `-1` after clearing to be extra
    defensive.