devtools: trap SIGINT is not recognizable to dash
PATCH 1/1 devtools: trap SIGINT is not recognizable to dash
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.
--- devtools/checkpatches.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
devtools/checkpatches.sh +1 -1
@@ -29,7 +29,7 @@ clean_tmp_files() { fi } -trap "clean_tmp_files" SIGINT +trap "clean_tmp_files" INT print_usage () { cat <<- END_OF_HELP
Signature · 1 line
2.11.0
Quoted 14 lines
-----Original Message-----
From: stable [mailto:[email protected]] On Behalf Of Gavin Hu
Sent: Wednesday, August 1, 2018 6:23 AM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]
Subject: [dpdk-stable] [PATCH] devtools: trap SIGINT is not recognizable to dashWhen 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
Quoted 8 lines
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")Signed-off-by Gavin Hu <[email protected]>Reviewed-by Honnappa Nagarahalli <[email protected]>
Varghese, Vipin
Acked-byChecked with Ubuntu 16.04.4 LTS, it works.
Quoted 33 lines
-----Original Message-----
From: dev <[email protected]>
Sent: Wednesday, August 1, 2018 4:10 PM
To: Gavin Hu <[email protected]>; [email protected]
Cc: [email protected]; [email protected]
Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] devtools: trap SIGINT is not recognizable to dashQuoted 12 lines
-----Original Message-----
From: stable [mailto:[email protected]] On Behalf Of Gavin Hu
Sent: Wednesday, August 1, 2018 6:23 AM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]
Subject: [dpdk-stable] [PATCH] devtools: trap SIGINT is not recognizable to dashWhen running
checkpatch.sh, it generates the following error on some linux distributions(like Debian) with Dash as the default shell interpreter.
trap: SIGINT: bad trapQuoted 8 lines
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")Signed-off-by Gavin Hu <[email protected]>Reviewed-by Honnappa Nagarahalli <[email protected]>Acked-by John McNamara <[email protected]>
Thomas Monjalon
AppliedQuoted 7 lines
Quoted 7 lines
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 trapThe fix is to replace SIGINT with INT signal, it works for both bash and dash.
Quoted 7 lines
Quoted 5 lines
Fixes 4bec48184e ("devtools: add checks for ABI symbol addition")Signed-off-by Gavin Hu <[email protected]>Reviewed-by Honnappa Nagarahalli <[email protected]>Acked-by John McNamara <[email protected]>
Applied, thanks
Quoted 22 lines · On Wed, 1 Aug 2018 13:22:57 +0800 Gavin Hu <[email protected]> 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 trapThe fix is to replace SIGINT with INT signal, it works for both bash and dash.
Fixes 4bec48184e ("devtools: add checks for ABI symbol addition")Signed-off-by Gavin Hu <[email protected]>Reviewed-by Honnappa Nagarahalli <[email protected]>--- devtools/checkpatches.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)devtools/checkpatches.sh +0
-0
devtools/checkpatches.sh clean_tmp_files() { · line 35
Quoted 8 lines
devtools/checkpatches.sh +1
-1@@ -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
Hi Stephen,
I am no sure only supporting bash is acceptable or not. Any impact to freebsd?
We should seek wider opinions about this.
I did not meet your problem, either bash or dash, what's your shell?
Best Regards,
Gavin
Quoted 45 lines
-----Original Message-----
From: Stephen Hemminger <[email protected]>
Sent: Saturday, August 4, 2018 6:17 AM
To: Gavin Hu <[email protected]>
Cc: [email protected]; Honnappa Nagarahalli <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] [PATCH] devtools: trap SIGINT is not recognizable to dashQuoted 22 lines · On Wed, 1 Aug 2018 13:22:57 +0800 Gavin Hu <[email protected]> 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 trapThe fix is to replace SIGINT with INT signal, it works for both bash and dash.
Fixes 4bec48184e ("devtools: add checks for ABI symbol addition")Signed-off-by Gavin Hu <[email protected]>Reviewed-by Honnappa Nagarahalli <[email protected]>--- devtools/checkpatches.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)devtools/checkpatches.sh index renamed from devtools/checkpatches.sh +0
-0
2509269df..ba795ad1d100755devtools/checkpatches.sh clean_tmp_files() { · line 35
Quoted 8 lines
devtools/checkpatches.sh +1
-1@@ -29,7 +29,7 @@ clean_tmp_files() { fi } -trap "clean_tmp_files" SIGINT +trap "clean_tmp_files" INT print_usage () { cat <<- END_OF_HELPThis patch alone is not sufficient to make checkpatch run successfully
Quoted 6 lines
./devtools/checkpatches.sh: 52: read: Illegal option -dIt looks like the -d flag to read is also a bash extension.
I recommend changing both
checkpatches.shand check-symbol-changes to have #!/bin/bash
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Quoted 10 lines · On Sat, 4 Aug 2018 06:42:53 +0000 Gavin Hu <[email protected]> wrote:
Hi Stephen,
I am no sure only supporting bash is acceptable or not. Any impact to freebsd?
We should seek wider opinions about this.
I did not meet your problem, either bash or dash, what's your shell?
Best Regards,
Gavin
I am running Debian testing, still see complaints about -d
$ dpkg -S /bin/sh diversion by dash from: /bin/sh diversion by dash to: /bin/sh.distrib dash: /bin/sh
Also, requiring bash is not that big an issue on FreeBSD. We already require gnu make so requiring gnu shell is not something developers should really mind.