Michel Lespinasse wrote:
Hi,
I hit an issue with the following python code:
try:
get_orient = subprocess.Popen (['jpegexiforient', '-n', pathfull],
stdin = subprocess.PIPE,
stdout = subprocess.PIPE)
orient = get_orient.communicate ()[0]
except:
orient = None
The intent of this was to read the exif orientation of a picture, or just
use None if jpegexiforient can not run.
The application worked fine on my devel machine but I noticed that on a
different host, it crashed due to running out of file descriptors.
After investigation I found out that the above code was responsible,
leaking two file descriptors per invocation if jpegexiforient is not
installed on the host.
I don't see any way to fix it in my code either, since get_orient is not
defined in the exception path, there is no way I can close its file
descriptors myself. I believe this is a bug in the subprocess module,
it should make sure to clean up after itself when getting out on the
exception path.
This looks like a duplicate of http://bugs.python.org/issue3210.
Can you confirm if this seems likely (and, if so, perhaps add
a note to the bug indicating that the problem is on Linux as well)?
TJG 0 1184 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Xah Lee |
last post by:
Python Doc Problem Example: os.system
Xah Lee, 2005-09
today i'm trying to use Python to call shell commands. e.g. in Perl
something like
output=qx(ls)
in Python i quickly located the...
|
by: Kurt B. Kaiser |
last post by:
Patch / Bug Summary
___________________
Patches : 421 open ( +3) / 3530 closed ( +8) / 3951 total (+11)
Bugs : 963 open ( +4) / 6426 closed (+21) / 7389 total (+25)
RFE : 255 open...
|
by: Jonathan Fine |
last post by:
Hello
My problem is that I want a Python 2.4 module on
a server that is running Python 2.3. I definitely
want to use the 2.4 module, and I don't want to
require the server to move to Python...
|
by: bruce |
last post by:
hi...
can someone point me to where/how i would go about calling a ruby app from a
python app, and having the python app being able to get a returned value
from the ruby script.
something...
|
by: Michel Lespinasse |
last post by:
Hi,
I hit an issue with the following python code:
try:
get_orient = subprocess.Popen (,
stdin = subprocess.PIPE,
stdout = subprocess.PIPE)
orient = get_orient.communicate ()
except:
|
by: Michel Lespinasse |
last post by:
On Thu, Aug 28, 2008 at 10:37:48AM +0100, Tim Golden wrote:
The root cause is different (subprocess has separate implementations
for windows and posix), but the issues are similar. In the posix...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |