From mboxrd@z Thu Jan 1 00:00:00 1970 Mime-Version: 1.0 (Apple Message framework v622) In-Reply-To: References: <18008-95265@sneakemail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: arisawa@ar.aichi-u.ac.jp Date: Mon, 6 Jun 2005 21:25:18 +0900 To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Subject: [9fans] A bug in /proc/*/status Topicbox-Message-UUID: 5c574272-ead0-11e9-9d60-3106f5b1d025 Hello 9fans, Mr. Yamanashi gave me a nice patch to factotum that is designed for 9grid. but output of ps is buggy. cpu% ps ... arisawa 158 0:00 0:00 9336K Rendez fossil arisawa 181 0:00 0:00 252K Pread rc arisawa@outside.plan9.bell-lAwaitom 460 0:00 0:00 128K Awaitom tcp17010 arisawa@outside.plan9.bell-lAwaitom 461 0:00 0:00 248K Awaitom rc arisawa@outside.plan9.bell-lPreadom 462 0:00 0:00 128K Preadom tcp17010 arisawa@outside.plan9.bell-lPreadom 476 0:00 0:00 184K Preadom ps ... cpu% that comes from buggy /proc/*/status cpu% cat /proc/460/status tcp17010 arisawa@outside.plan9.bell-lAwaitom 0 .... /man/proc(3) says: The read-only status file contains a string with twelve fields, each followed by a space. The fields are: - the process name and user name, each 27 characters left justified - the process state, 11 characters left justified (see ps(1)) therefore "arisawa@outside.plan9.bell-lAwaitom" should be arisawa@outside.plan9.bell- Awaitom Kenji Arisawa