[dpdk-dev] [PATCH v5 2/3] examples/l2fwd: Handle SIGINT and SIGTERM in l2fwd

Stephen Hemminger stephen at networkplumber.org
Thu Dec 31 18:01:53 CET 2015


On Wed, 30 Dec 2015 16:59:50 -0500
Zhihong Wang <zhihong.wang at intel.com> wrote:

> +static void
> +signal_handler(int signum)
> +{
> +	if (signum == SIGINT || signum == SIGTERM) {
> +		printf("\n\nSignal %d received, preparing to exit...\n",
> +				signum);
> +		force_quit = true;

Actually, the if () is redundant since you only registered SIGINT, and SIGTERM those are the
only signals you could possibly receive.

Acked-by: Stephen Hemminger <stephen at networkplumber.org>


More information about the dev mailing list