Stop SIGFPE on vmstat at times

Certain setups can crash vmstat with a SIGFPE, this small patch
catches those events

Bug-Debian: http://bugs.debian.org/677903
This commit is contained in:
Craig Small 2012-10-30 21:48:34 +11:00
parent ff6c8aad3e
commit 64fa889816

View File

@ -258,6 +258,7 @@ static void new_format(void)
diow = *cpu_iow;
dstl = *cpu_zzz;
Div = duse + dsys + didl + diow + dstl;
if (!Div) Div = 1, didl = 1;
divo2 = Div / 2UL;
printf(format,
running, blocked,
@ -312,6 +313,7 @@ static void new_format(void)
}
Div = duse + dsys + didl + diow + dstl;
if (!Div) Div = 1, didl = 1;
divo2 = Div / 2UL;
printf(format,
running,