lua-users home
lua-l archive

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

The nasty thing here seems to be, that this is different for any
operating system.

Usually it would be nice to implement such functionality into flush I
think, but if you have to write different code for any operating
system, then this gets a bit much for Lua?

(fsync e. g. will not be available in MS-Win, in fact I am not sure at
all how you can accomplish this in MS Win software).

(but you could also say, that it would be job of your Linux compiler
to organize such things, so that flush really works "sure" and not
possibly only "virtual").

Am Mo., 19. Sept. 2022 um 18:40 Uhr schrieb Tomas Mudrunka <>:
> Note that fflush() flushes only the user-space buffers provided
>         by the C library.  To ensure that the data is physically stored
>         on disk the kernel buffers must be flushed too, for example, with
>         sync(2) or fsync(2).