[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Synchronous file IO in Lua?
- From: bil til <biltil52@...>
- Date: Tue, 20 Sep 2022 08:40:51 +0200
The nasty thing here seems to be, that this is different for any
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 <email@example.com>:
> 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).