A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2004-October/049628.html below:

Bug [ 959379 ] Implicit close() should check for errors

[Python-Dev] Re: Bug [ 959379 ] Implicit close() should check for errors [Python-Dev] Re: Bug [ 959379 ] Implicit close() should check for errorsDavid Bolen db3l at fitlinxx.com
Mon Oct 25 23:27:24 CEST 2004
Peter Astrand <astrand at lysator.liu.se> writes:

> I'd like to resolve bug 959379. Here's a naive fix. Comments?

If you're going to match the normal close() processing, shouldn't that
check the result against EOF and not just != 0?  If for example, the
file object is being used for a pipe, the result of the close might be
the result code of the child process which need not be an error.  I
think that only EOF should signify a failure of the close(), and only
in that case is errno probably appropriate (which perror will pick
up).

-- David

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4