Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.unix.programmer > #13634
| From | Joe Pfeiffer <pfeiffer@cs.nmsu.edu> |
|---|---|
| Newsgroups | comp.unix.programmer |
| Subject | Re: How to check for error with write(2) |
| Date | 2021-12-16 20:10 -0700 |
| Organization | A noiseless patient Spider |
| Message-ID | <1b8rwkvsdx.fsf@pfeifferfamily.net> (permalink) |
| References | <spfuo5$lb0$1@gioia.aioe.org> <b6f9685b-3f40-4b2a-8e1d-1fe2f08a5f11n@googlegroups.com> |
Philip Guenther <guenther@gmail.com> writes:
<snip>
but down below the ERRORS section, in the NOTES:
A successful return from write() does not make any guarantee that data
has been committed to disk. On some filesystems, including NFS, it
does not even guarantee that space has successfully been reserved for
the data. In this case, some errors might be delayed until a future
write(), fsync(2), or even close(2). The only way to be sure is to
call fsync(2) after you are done writing all your data.
Successfully writing to the file system isn't the same thing as
successfully writing to actual nonvolatile storage (ie the disk). Much
as we wish it were (and in all but a microscopic subset of cases we can
get away with pretending).
Back to comp.unix.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How to check for error with write(2) Steve Keller <keller.steve@gmx.de> - 2021-12-16 18:58 +0100
Re: How to check for error with write(2) scott@slp53.sl.home (Scott Lurndal) - 2021-12-16 18:26 +0000
Re: How to check for error with write(2) Geoff Clare <geoff@clare.See-My-Signature.invalid> - 2021-12-20 13:52 +0000
Re: How to check for error with write(2) Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2021-12-16 18:49 +0000
Re: How to check for error with write(2) Rainer Weikusat <rweikusat@talktalk.net> - 2021-12-16 19:00 +0000
Re: How to check for error with write(2) Rainer Weikusat <rweikusat@talktalk.net> - 2021-12-16 19:06 +0000
Re: How to check for error with write(2) Jorgen Grahn <grahn+nntp@snipabacken.se> - 2021-12-16 22:34 +0000
Re: How to check for error with write(2) Steve Keller <keller.steve@gmx.de> - 2021-12-17 04:38 +0100
Re: How to check for error with write(2) Rainer Weikusat <rweikusat@talktalk.net> - 2021-12-17 15:14 +0000
Re: How to check for error with write(2) Jorgen Grahn <grahn+nntp@snipabacken.se> - 2021-12-18 10:25 +0000
Re: How to check for error with write(2) Philip Guenther <guenther@gmail.com> - 2021-12-16 15:04 -0800
Re: How to check for error with write(2) Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2021-12-16 20:10 -0700
Re: How to check for error with write(2) Steve Keller <keller.steve@gmx.de> - 2021-12-17 04:35 +0100
Re: How to check for error with write(2) Philip Guenther <guenther@gmail.com> - 2021-12-18 14:58 -0800
Re: How to check for error with write(2) scott@slp53.sl.home (Scott Lurndal) - 2021-12-19 16:07 +0000
csiph-web