greybus: loopback_test: handle SIGINT signal
authorAxel Haslam <ahaslam@baylibre.com>
Fri, 11 Mar 2016 12:19:30 +0000 (13:19 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Thu, 17 Mar 2016 04:49:31 +0000 (21:49 -0700)
commit3b90040de82a43ee0538d36b32c9fa4cbbab59c6
tree86e852256c648da8af54716058765f33bfabda40
parentfece9c87cb80aceec7dd0205a77c37ff7ba831fe
greybus: loopback_test: handle SIGINT signal

Adding a default timeout may not be representative of every
usecase for gb_loopback. Also, tests may continue to run
on the driver in case of a timeout.

To avoid adding a default timeout, handle SIGINT so that when the user
presses ctrl-c the test are stoped. The user can still specify a timeout
value with the -O option.

Signed-off-by: Axel Haslam <ahaslam@baylibre.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/tools/loopback_test.c