Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As I said, it is best effort :)

On the logging system I'm familiar with, the logging queue is lock-free, so any invariant is preserved at every instruction boundary. The log is actually written to disk from a background thread, and the signal handler is responsible of signaling the log thread to flush the logging queue(s).

Of course if the log thread itself has generated the sigsegv (because a log entry or the queue itself is corrupted by a bug) you are out of luck, but you are no worse than not attempting the flush.

Agree that making the log thread a separate process instead is significantly more robust (and not significantly harder in fact).



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: