• Petr Pudlak's avatar
    Enhance watchFile in Ganeti.Utils · f2717b21
    Petr Pudlak authored
    
    
    The functionality is kept the same, but instead of comparing for
    equality, a more general version based on a predicate is added.
    This allows to base the condition on only a part of the output.
    
    In addition, 'bracket' is added so that inotify data structure is
    properly cleaned up even if the inner IO action throws an exception.
    Signed-off-by: default avatarPetr Pudlak <pudlak@google.com>
    Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
    f2717b21
Utils.hs 25.7 KB