All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cocci] [PATCH] coccicheck: Fix missing 0 index in kill loop
@ 2016-05-16 12:55 ` Kees Cook
  0 siblings, 0 replies; 8+ messages in thread
From: Kees Cook @ 2016-05-16 12:55 UTC (permalink / raw)
  To: cocci

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 <keescook@chromium.org>
---
 scripts/coccicheck | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/coccicheck b/scripts/coccicheck
index b2d758188f2f..dd85a455b2ba 100755
--- a/scripts/coccicheck
+++ b/scripts/coccicheck
@@ -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
-- 
2.6.3


-- 
Kees Cook
Chrome OS & Brillo Security

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-05-19  7:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-16 12:55 [Cocci] [PATCH] coccicheck: Fix missing 0 index in kill loop Kees Cook
2016-05-16 12:55 ` Kees Cook
2016-05-17 14:32 ` [Cocci] " Nicolas Palix (LIG)
2016-05-17 14:32   ` Nicolas Palix (LIG)
2016-05-17 14:33   ` [Cocci] " Julia Lawall
2016-05-17 14:33     ` Julia Lawall
2016-05-19  7:57     ` [Cocci] " Michal Marek
2016-05-19  7:57       ` Michal Marek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.