popen problem

Marco Catunda catunda at pobox.com
Fri Feb 16 14:06:19 CET 2001


	I've written a program using threads and popen. Basically, this program
	execute a pool of threads and each thread executes a command ping with 
	open function. Like bellow:

	outFile = os.popen( "ping localhost", "r" )
	lines = outFile.readlines()

	I have no idea why, at some cases, the outfile.close() function
generates an 
	IOError except. This except generating is totaly random. 

	Does anyone have an idea why it happens? And how can I correct it?
	Is popen thread safe?
 	Thanks for help.

-- Marco Catunda

More information about the Python-list mailing list