On MacOSX, in a C ++ program, what guarantees can I get in the IO file

I am on MacOSX. I am writing a multi-threaded program. One thread registers. At any time, a failure may occur in streams without registration.

What agreements should be accepted in the registrar / what guarantees do I have?

I would prefer a solution, even if I crash during the recording, the previous recordings still go to disk, and when I read the magazine, I can understand, “ah, I wrote 100 full quotes, then I broke 101st” .

Thank!

+3
source share
2 answers

I program on Linux, not MacOSX, but it's probably there too.

, , , , , , - .

, segfaults, .

( Linux), , :

  • , (syslog, ). , , , , , .

  • , . . , .

, .

+1

, , , . ? ? , , .

syslog Unix . , (.. , , , ).

Mac OS X, " Apple" (ASL). API, syslog .

+1

Source: https://habr.com/ru/post/1736616/


All Articles