close(), exceptions and problems
David Bolen
db3l at fitlinxx.com
Mon Mar 26 20:43:13 EST 2001
erwin at andreasen.com (Erwin S. Andreasen) writes:
> What exactly do you mean by "interrupted" ?
>
> close(), the system call, usually cannot fail (unless you try to close a fd
> that is not open).
Note that close() is often is the point at which buffered data is
flushed to a file, so there are a variety of ways in which that can
fail (I/O error, out of disk space, etc...) which will cause the
close() to fail.
I had a co-worker once who didn't check the results of a close() after
re-writing a new version of a config file following an update, and
didn't realize that it got truncated due to running out of disk space.
--
-- David
--
/-----------------------------------------------------------------------\
\ David Bolen \ E-mail: db3l at fitlinxx.com /
| FitLinxx, Inc. \ Phone: (203) 708-5192 |
/ 860 Canal Street, Stamford, CT 06902 \ Fax: (203) 316-5150 \
\-----------------------------------------------------------------------/
More information about the Python-list
mailing list