Description
Hi,
I am using matplotlib's tex text formatting feature on Mac OS X and run into trouble: more often than not the function find_tex_file in dviread.py throws an OSError (interrupted system call) - it seems as pipe.communicate() does not wait for the process to terminate as it is stated in the python docs. The fix is very easy: just add pipe.wait() directly before the pipe.communicate() call which does wait for the process to terminate and solves this problem for good and should not hurt on any other OS.
Also note that the function _read_nointr that is defined below is never used - it seems like it was once used to work around my problem as it does what I did at first also: just loop and retry till no race condition occures. That is obviously not a good solution though :).