[PATCH] /proc/*/statm empty -- breaks top

I Lee Hetherington (ilh@sls.lcs.mit.edu)
Wed, 20 Jan 1999 10:26:21 -0500


This is a multi-part message in MIME format.
--------------C9A73312AD3D0097E9CA9885
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Changes in -pre8 fs/proc/array.c create empty /proc/*/statm files (e.g.,
for kswapd and kflushd, among others). -pre7 instead produced files
with all values 0. The empty files break top from procps-1.2.9. This
seems undesirable so close to 2.2.0.

The small attached patch produces zero-valued files instead of empty
files once again.

--Lee Hetherington

--------------C9A73312AD3D0097E9CA9885
Content-Type: text/plain; charset=us-ascii;
name="statm.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="statm.patch"

--- linux-2.2.0-pre8/fs/proc/array.c Thu Jan 14 13:49:22 1999
+++ linux/fs/proc/array.c Wed Jan 20 10:06:20 1999
@@ -1085,8 +1085,7 @@
vma = vma->vm_next;
}
release_mm(mm);
- } else
- return 0;
+ }
return sprintf(buffer,"%d %d %d %d %d %d %d\n",
size, resident, share, trs, lrs, drs, dt);
}

--------------C9A73312AD3D0097E9CA9885--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/