Catch servod exceptions properly
When ran in chroot, many Python scripts are invoked through a wrapper,
which imports the script and executes the script's main() function. In
this case exception handler outside main() never gets a chance to run.
Add an exceptions catcher wrapper to make sure problems and ^C are
handled gracefully even when imported by a wrapper.
start servod and then terminate it with ^C. Observe the program
stopping without printing Python stack backtrace
Signed-off-by: Vadim Bendebury <firstname.lastname@example.org>
Reviewed-by: Todd Broch <email@example.com>
Reviewed-by: Jeremy Thorpe <firstname.lastname@example.org>
1 file changed