Subject: bin/242: ps loops when writing to a pipe
To: None <gnats-admin>
From: Bob Kemp <rsk@allegory.demon.co.uk>
List: netbsd-bugs
Date: 05/03/1994 16:05:02
>Number: 242
>Category: bin
>Synopsis: ps loops when writing to a pipe
>Confidential: yes
>Severity: non-critical
>Priority: medium
>Responsible: gnats-admin (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue May 3 16:05:01 1994
>Originator: Bob Kemp
>Organization:
Home Internet node
Robert Kemp rsk@allegory.demon.co.uk Phone: +44 489 581 800
>Release: -current 05mar94 <<< NB: OLD SYSTEM
>Environment:
System: NetBSD allegory 0.9a ALLEGORY#0 i386
>Description:
FIRST NOTE that I'm using an old version of -current, so it may
have already been fixed. I don't have access to a recent version
and it seems too unstable for me to upgrade at the moment.
The symptom is that ps occasionally loops when writing to a pipe.
It doesn't seem to manifest itself when writing to a file (say).
The shell commands below produce about two looping "ps" commands
per run. Ignore the broken pipe error messages. That stuff is
irrelevant, I just added the $f arg to show the values for which
it failed.
>How-To-Repeat:
#!/bin/csh -fx
foreach f ( {1,2,3,4,5,6,7,8,9,0}{1,2,3,4,5,6,7,8,9,0} )
ps ax | cat - | echo $f > /dev/null &
echo $f
end
jobs -l
wait
>Fix:
>Audit-Trail:
>Unformatted:
------------------------------------------------------------------------------