coccicheck: Fix missing 0 index in kill loop
PATCH 1/1 coccicheck: Fix missing 0 index in kill loop
By default, "seq" counts from 1, but processes were starting counting from 0, so when interrupted, coccicheck would leave the 0th process running.
--- scripts/coccicheck | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/coccicheck +1 -1
@@ -98,7 +98,7 @@ run_cmd() { } kill_running() { - for i in $(seq $(( NPROC - 1 )) ); do + for i in $(seq 0 $(( NPROC - 1 )) ); do if [ $VERBOSE -eq 2 ] ; then echo "Killing ${SPATCH_PID[$i]}" fi
Signature · 6 lines
2.6.3 -- Kees Cook Chrome OS & Brillo Security
Le 16/05/16 14:55, Kees Cook a ?crit :
Quoted 5 lines
By default, "seq" counts from 1, but processes were starting counting from 0, so when interrupted, coccicheck would leave the 0th process running.
Signed-off-by Kees Cook <[email protected]>
Quoted 18 lines
--- scripts/coccicheck | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)scripts/coccicheck +1
-1@@ -98,7 +98,7 @@ run_cmd() { } kill_running() { - for i in $(seq $(( NPROC - 1 )) ); do + for i in $(seq 0 $(( NPROC - 1 )) ); do if [ $VERBOSE -eq 2 ] ; then echo "Killing ${SPATCH_PID[$i]}" fi
Signature · 10 lines
Nicolas Palix http://lig-membres.imag.fr/palix/ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2959 bytes Desc: Signature cryptographique S/MIME URL: <https://systeme.lip6.fr/pipermail/cocci/attachments/20160517/5fcdf348/attachment.p7s>
Julia Lawall
Acked-byQuoted 8 lines · Nicolas Palix (LIG)
Le 16/05/16 14:55, Kees Cook a ?crit :
Quoted 5 lines
By default, "seq" counts from 1, but processes were starting counting from 0, so when interrupted, coccicheck would leave the 0th process running.
Signed-off-by Kees Cook <[email protected]>Acked-by Nicolas Palix <[email protected]>
Quoted 27 lines
Quoted 12 lines
--- scripts/coccicheck | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)scripts/coccicheck +0
-0scripts/coccicheck run_cmd() { · line 104
Quoted 8 lines
scripts/coccicheck +1
-1@@ -98,7 +98,7 @@ run_cmd() { } kill_running() { - for i in $(seq $(( NPROC - 1 )) ); do + for i in $(seq 0 $(( NPROC - 1 )) ); do if [ $VERBOSE -eq 2 ] ; then echo "Killing ${SPATCH_PID[$i]}" fi--
Nicolas Palix
http://lig-membres.imag.fr/palix/
Dne 17.5.2016 v 16:33 Julia Lawall napsal(a):
Quoted 9 lines · Nicolas Palix (LIG)
Quoted 6 lines
Le 16/05/16 14:55, Kees Cook a ?crit :
Quoted 4 lines
By default, "seq" counts from 1, but processes were starting counting from 0, so when interrupted, coccicheck would leave the 0th process running.
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Kees Cook <[email protected]>Acked-by Nicolas Palix <[email protected]>Acked-by Julia Lawall <[email protected]>
Applied to kbuild.git#misc.
Michal