• Tomasz Miąsko's avatar
    gmain: Guarantee handler dispatch after receiving UNIX signal · 969b0e00
    Tomasz Miąsko authored
    Guarantee that user signal callback is dispatched _after_ receiving a
    signal as long as the handler expresses continued interest in receiving
    such a notification.
    
    Previously if a signal has been received during user callback dispatch
    but before pending flag had been cleared then the signal would be
    irrevocably lost.
    
    This is a very useful guarantee to have in cases where signals are used
    to signify a need for synchronization with external resources. For
    example: reloading configuration file after SIGUSR1 or retrieving a
    terminal size after SIGWINCH.
    969b0e00
unix.c 7.32 KB