Re: EDQUOT lurks in most apps

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

 



Stephen Smoogen <ssmoogen@xxxxxxxxxx> writes:

> I have seen this listed as NOT A BUG even with realtime programmers because
> the application can be run in all kinds of ways which could induce failures
> that are 'environment' versus 'application'. I expect it depends on the
> exact environment but what is the correct code?

AFAIU, it's best to call fsync() before calling close().
The manpage for close() suggests the following [1]:

    A careful programmer who wants to know about I/O errors may precede
    close() with a call to fsync(2).

It's also worth mentioning that printf() may not be able to catch this
kind of error [2].

[1] https://www.mankier.com/2/close#Notes-Dealing_with_error_returns_from_close()
[2] https://www.mankier.com/2/close#Errors-ENOSPC

-- 
Tulio Magno
-- 
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux