[Python-Dev] Re: Bug [ 959379 ] Implicit close() should check for errors (original) (raw)
David Bolen db3l at fitlinxx.com
Mon Oct 25 23:27:24 CEST 2004
- Previous message: [Python-Dev] Bug [ 959379 ] Implicit close() should check for errors
- Next message: [Python-Dev] Re: Bug [ 959379 ] Implicit close() should check for errors
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: [Python-Dev] Bug [ 959379 ] Implicit close() should check for errors
- Next message: [Python-Dev] Re: Bug [ 959379 ] Implicit close() should check for errors
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]