[Python-bugs-list] [ python-Bugs-410608 ] popen with threads

noreply@sourceforge.net noreply@sourceforge.net
Wed, 04 Apr 2001 18:51:48 -0700


Bugs item #410608, was updated on 2001-03-22 13:46
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=410608&group_id=5470

>Category: Threads
Group: None
Status: Open
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
>Assigned to: Tim Peters (tim_one)
Summary: popen with threads

Initial Comment:
This code generate a error

##########################
import threading
import os

class TestPopen( threading.Thread ):

   def run( self ):
      while 1:
         f = os.popen( "ls -l /" )
         lines = f.read()
         f.close()

if __name__ == "__main__":
   for i in range(50):
      t = TestPopen()
      t.start()
###########################

it eventually dies w/ IOErrors in the f.close() calls.

My system is:
Linux RedHat 6.2
Python 1.5.2
I tested in Python 2.0 and the same error occur.




----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=410608&group_id=5470