Skip to content

Commit

Permalink
Make 'ps' not report itself
Browse files Browse the repository at this point in the history
This has been an irritant for a very long time.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
  • Loading branch information
brho committed Jul 11, 2019
1 parent 5858ff1 commit ba425c2
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions kern/kfs/bin/ps
@@ -1,6 +1,10 @@
#!/bin/bash
for i in `echo '#proc/*/status'`
do
cat $i
echo
#!/bin/sh
PID=$$
for i in \#proc/*/status; do
if [ "$i" == "#proc/self/status" ] || \
[ "$i" == "#proc/$PID/status" ]; then
continue
fi
cat $i
echo
done

0 comments on commit ba425c2

Please sign in to comment.