From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH] devtools: trap SIGINT is not recognizable to dash Date: Fri, 3 Aug 2018 15:17:15 -0700 Message-ID: <20180803151715.4197d43d@xeon-e3> References: <20180801052257.14869-1-gavin.hu@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, honnappa.nagarahalli@arm.com, stable@dpdk.org To: Gavin Hu Return-path: Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) by dpdk.org (Postfix) with ESMTP id B7A721B5C4 for ; Sat, 4 Aug 2018 00:17:23 +0200 (CEST) Received: by mail-pf1-f193.google.com with SMTP id k21-v6so3920822pff.11 for ; Fri, 03 Aug 2018 15:17:23 -0700 (PDT) In-Reply-To: <20180801052257.14869-1-gavin.hu@arm.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, 1 Aug 2018 13:22:57 +0800 Gavin Hu wrote: > When running checkpatch.sh, it generates the following error > on some linux distributions(like Debian) with Dash as the > default shell interpreter. > trap: SIGINT: bad trap > > The fix is to replace SIGINT with INT signal, it works for > both bash and dash. > > Fixes: 4bec48184e ("devtools: add checks for ABI symbol addition") > Cc: stable@dpdk.org > > Signed-off-by: Gavin Hu > Reviewed-by: Honnappa Nagarahalli > --- > devtools/checkpatches.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh > index 2509269df..ba795ad1d 100755 > --- a/devtools/checkpatches.sh > +++ b/devtools/checkpatches.sh > @@ -29,7 +29,7 @@ clean_tmp_files() { > fi > } > > -trap "clean_tmp_files" SIGINT > +trap "clean_tmp_files" INT > > print_usage () { > cat <<- END_OF_HELP This patch alone is not sufficient to make checkpatch run successfully ./devtools/checkpatches.sh: 52: read: Illegal option -d It looks like the -d flag to read is also a bash extension. I recommend changing both checkpatches.sh and check-symbol-changes to have #!/bin/bash