• Iustin Pop's avatar
    hbal: change handling of signal · 543e859d
    Iustin Pop authored
    Currently, hbal does a one-two signal handling, where the first signal
    causes graceful termination, and the second one an immediate on (either
    SIGINT or SIGTERM can be used, interchangeably). However, this poses a
    timing problem: if two programs want to send a graceful termination
    request, they cannot do that without careful coordination.
    To fix this, we change to code to handle the signal separately: SIGINT
    (^C) sends graceful termination, while SIGTERM sends immediate
    termination. This should allow easier controlling of hbal.
    Signed-off-by: default avatarIustin Pop <iustin@google.com>
    Reviewed-by: default avatarBalazs Lecz <leczb@google.com>
hbal.hs 13.4 KB