bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug: tests/fsync.c: don't check for fsync failure on invalid fd


From: Phillip Susi
Subject: Re: Bug: tests/fsync.c: don't check for fsync failure on invalid fd
Date: Wed, 13 Mar 2013 10:31:36 -0400
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130307 Thunderbird/17.0.4

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 3/13/2013 10:02 AM, Eric Blake wrote:
> There may be no syncing action, but it is still reasonable to
> ensure that the fd is still valid enough to be sync'd.  It's a
> single fcntl() call to prove whether an fd is valid.

Yes, but why?  Why does gnulib care?  I can't imagine any application
in its right mind relying on getting EBADF for correct operation, so
why is gnulib asserting that this happens?

>> Why does gnulib care that it fails when used wrongly?
> 
> Because POSIX mandates an EBADF error, and your LD_PRELOAD should
> not be breaking those semantics.

It also mandates that it not return until the data is on disk.  The
whole point of the library is to violate posix, without letting
applications know.  Is gnulib also going to do an O_DIRECT read after
fsync to assert that the data hit the disk before it returned?  How
pedantic are we going to get here?


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJRQI3IAAoJEJrBOlT6nu75OG0IAITdFlxLqdi+NAzV1MsQNhIp
i3xqDe6iVuSTM257pubJdcrAxZ+/psflH6LR67rN0fSlKnhSoo+ZZaVHkTXYGtCV
wEA7MwJ9guPaKorXmtAaqA0BhaC9LfwifRjI0eKILh/P0YYNRwznUCCcWPCGZBVe
e4OSuNrjLhywADicT+IaOpDvHB7P8Blpk6tFe7xxqP+bLu3+EHRSQp2jMVvXn8ii
vGLjvg3Tkf3AVGoUVH6htJ4VtxaPAt55c/QifD1YNXcMlRZAyF42wblipbO5azJ/
dREdMgU2/iUKri19So1RnBfkcMfmzTfpRsqhRfytyw5QfHKYvKltjoC0Z5szg1s=
=fQx7
-----END PGP SIGNATURE-----



reply via email to

[Prev in Thread] Current Thread [Next in Thread]