Frontend: Make sure SIGINT and SIGTERM are nicely handled

Signed-off-by: Jerome Flesch <jflesch@gmail.com>