From: Craig Small Date: Sat, 16 Jun 2012 08:09:24 +0000 (+1000) Subject: killall assert lifetime X-Git-Tag: v22.18~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b2852b285f4011f6190e18cb88df1b91353a28ae;p=psmisc killall assert lifetime Sometimes killall younger-than or older-than would trigger an assert failure because the process age was too small and was close to zero. Bug reported and analysed by Frédéric Brière Bug-Debian: http://bugs.debian.org/628617 --- diff --git a/ChangeLog b/ChangeLog index 2be2030..0b7e4eb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,8 @@ Changes in 22.18 ================ * Added AC_CANONICAL_TARGET for target_os Debian #673485 * sed doesn't have [0-9]+ replace with [0-9][0-9]* + * assert in killall triggered for small lifetimes Debian #628617 + Changes in 22.17 ================ diff --git a/src/killall.c b/src/killall.c index da26237..c08d142 100644 --- a/src/killall.c +++ b/src/killall.c @@ -383,7 +383,7 @@ kill_all (int signal, int names, char **namelist, struct passwd *pwent) continue; } process_age_sec = process_age(proc_stt_jf); - assert(process_age_sec > 0); + assert(process_age_sec >= 0L); } (void) fclose (file);