*BSD News Article 3323


Return to BSD News archive

Xref: sserve comp.unix.bsd:3367 comp.bugs.4bsd:1879
Path: sserve!manuel!munnari.oz.au!samsung!nighthawk.clearpoint.com!transfer!m2c!nic.umass.edu!noc.near.net!news.Brown.EDU!qt.cs.utexas.edu!cs.utexas.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!usc!sol.ctr.columbia.edu!destroyer!ubc-cs!uw-beaver!zephyr.ens.tek.com!psgrain!m2xenix!agora!davidg
From: davidg@agora.rain.com (David Greenman)
Newsgroups: comp.unix.bsd,comp.bugs.4bsd
Subject: 'ps aux' bug fix for 386BSD
Message-ID: <1992Aug9.130540.26632@agora.uucp>
Date: 9 Aug 92 13:05:40 GMT
Sender: davidg@agora.uucp (David Greenman)
Organization: Open Communications Forum
Lines: 29


   Finally, after hours of debugging, I solved the 'ps aux' bug.
This one wasn't easy; there were many things along the way that
mislead in the wrong direction.
   First, there is a 'bug' of sorts in the floating exception
code of the kernel that causes floating point exceptions to be
significantly delayed, and this was the reason why the bug didn't
'appear' to be in the 'ps' code. Oh well....I was wrong, the bug
WAS in 'ps'. 
   Here is the patch: (yes, stupid isn't it...)


*** /usr/src/bin/ps/ps.c.01orig	Mon Jul  1 17:54:45 1991
--- /usr/src/bin/ps/ps.c	Sun Aug  9 05:35:26 1992
***************
*** 78,83 ****
--- 78,84 ----
  
  uid_t	getuid();
  char	*ttyname();
+ double	getpcpu();
  
  char dfmt[] = "pid tt state time command";
  char jfmt[] = "user pid ppid pgid sess jobc state tt time command";


---
David Greenman
davidg%implode@agora.rain.com