Mainloop: handle SIGINT as well (and terminate)
authorGuido Trotter <ultrotter@google.com>
Fri, 21 May 2010 10:24:54 +0000 (11:24 +0100)
committerGuido Trotter <ultrotter@google.com>
Sat, 22 May 2010 06:58:30 +0000 (07:58 +0100)
commitf59dce3e94f67493b7767dd9e1d2924094692bfa
treeb72dcfd573a641e8ea28707879e9d23c94af1cf2
parentd021e47813dd73f7bd0537497ea5b761c3439553
Mainloop: handle SIGINT as well (and terminate)

This is needed if daemons are in the foreground, and get ctrl+c-ed by
the user. Also add unittests to make sure the correct signals terminate
the mainloop.

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
lib/daemon.py
test/ganeti.daemon_unittest.py