From 700a5aed75dca84eba1714aa44d698283be68d63 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Tue, 6 Jun 2000 18:10:17 +0000 Subject: Fixed exit status for killall --- procps/kill.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'procps/kill.c') diff --git a/procps/kill.c b/procps/kill.c index 1f1bee48b..75277d962 100644 --- a/procps/kill.c +++ b/procps/kill.c @@ -228,14 +228,17 @@ extern int kill_main(int argc, char **argv) } #ifdef BB_KILLALL else { + int all_found = TRUE; pid_t myPid=getpid(); /* Looks like they want to do a killall. Do that */ while (--argc >= 0) { pid_t* pidList; pidList = findPidByName( *argv); - if (!pidList) + if (!pidList) { + all_found = FALSE; errorMsg( "%s: no process killed\n", *argv); + } for(; pidList && *pidList!=0; pidList++) { if (*pidList==myPid) @@ -248,6 +251,7 @@ extern int kill_main(int argc, char **argv) * upon exit, so we can save a byte or two */ argv++; } + exit (all_found); } #endif -- cgit v1.2.3