On 10/18/2016 2:27 AM, Petter Reinholdtsen wrote:
> [Petter Reinholdtsen]
>> This make me believe libeatmydata should change to behave according to the
>> POSIX specification.
> And just to make it more clear why I believe this. My understanding of
> is that it should make the computer behave as normal while ignoring
> any calls to force file buffers to sync to disk. Returning 0 instead of -1
> for a
> bad file descriptors is not behaving like normal. Linux and any other POSIX
> compliant operating system return -1 in this case.
Yes, but the fact that you pass an invalid fd in the first place is not
normal. The reason for returning an error in this case is to tell the
application that the data it wanted to flush has not been. The whole
point of eatmydata is to let the application think it has been flushed.
Also, why does anyone give a damn about not getting EBADFD? You should
never see this in practice anyhow.