On Friday, August 24, 2018 at 11:20:46 AM UTC+2, Paweł Szczur wrote:
>
> Hi,
>
> I have a long running hobby program with a code:
>
> var (
>url = "https://example.com";
>lastBody []byte
> )
>
>
> func get(client *http.Client, dir) (changed bool, data []byte, err error) {
>
>resp,
>From the program's perspective the file is indeed flushed on close. The
kernel deferring writes to disk can only have any effect if the system
crashes, and the files will be flushed to disk within a short time anyway.
You absolutely do NOT need to call fsync every file on close unless you
require
No, the file is not flushed on close.
https://linux.die.net/man/2/close
"A successful close does not guarantee that the data has been successfully
saved to disk, as the kernel defers writes. It is not common for a file
system to flush the buffers when the stream is closed. If you need to be
sur
If you're asking about dmesg, I'm not seeing anything related.
Yes, I'm on linux. The dir was created successfully, I guess it was not a
problem. Also, I believe the file is flushed on Close.
I will look into the link.
Paweł
On Friday, August 24, 2018 at 6:33:15 PM UTC+2, Manlio Perillo wrote:
No.
On Friday, August 24, 2018 at 6:47:01 PM UTC+2, dja...@gmail.com wrote:
>
> Hi,
> did you write files in /tmp on linux ?
> (and there is daemon that clean old files in /tmp ?)
>
> Regards,
> Djadala
>
>
>
--
You received this message because you are subscribed to the Google Groups
"golang-n
Hi,
did you write files in /tmp on linux ?
(and there is daemon that clean old files in /tmp ?)
Regards,
Djadala
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
On Friday, August 24, 2018 at 4:19:17 PM UTC+2, Paweł Szczur wrote:
>
> Thanks. Both things you mentioned are already fixed. The MakeDir may of
> course fail and now I handle it, but in described situation it was not an
> issue.
> The files were written for most of the day successfully and sudden
Thanks. Both things you mentioned are already fixed. The MakeDir may of
course fail and now I handle it, but in described situation it was not an
issue.
The files were written for most of the day successfully and suddenly they
stopped to appear.
The disk was and is not full. There was no error r
On Friday, August 24, 2018 at 11:20:46 AM UTC+2, Paweł Szczur wrote:
>
> Hi,
>
> I have a long running hobby program with a code:
>
> var (
>url = "https://example.com";
>lastBody []byte
> )
>
>
> func get(client *http.Client, dir) (changed bool, data []byte, err error) {
>
>resp,