If the program is killed or aborted with CTRL-C, dies nicely.
That warrants that any data being processed to be handled, that
opened files will be closed and that the memory gets freed.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
if (args.traffic_monitor) {
signal(SIGALRM, do_timeout);
+ signal(SIGTERM, do_timeout);
+ signal(SIGINT, do_timeout);
if (args.timeout > 0)
alarm(args.timeout);
}
signal(SIGALRM, do_timeout);
+ signal(SIGTERM, do_timeout);
+ signal(SIGINT, do_timeout);
if (args.timeout > 0)
alarm(args.timeout);