Commit 64fa8898 authored by Craig Small's avatar Craig Small

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
parent ff6c8aad
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment