[dpdk-dev] [PATCH] devtools: trap SIGINT is not recognizable to dash
Stephen Hemminger
stephen at networkplumber.org
Sat Aug 4 00:17:15 CEST 2018
On Wed, 1 Aug 2018 13:22:57 +0800
Gavin Hu <gavin.hu at arm.com> 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 at dpdk.org
>
> Signed-off-by: Gavin Hu <gavin.hu at arm.com>
> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli at amr.com>
> ---
> 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
More information about the dev
mailing list