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

Re: Flushing all Buffers Before Exiting



On Sat, Mar 23, 2019 at 10:27:01AM -0500, David Wright wrote:
> On Fri 22 Mar 2019 at 17:45:50 (+0100), tomas@tuxteam.de wrote:

> Reading the OP's problem, I wonder how you're meant to detect
> "any whiff of a problem" [...]

Torture tests.

> The main concern raised in the OP was flushing before termination,
> for which a signal is ideal. And for best performance, I'd forget
> tee and just look at the output file occasionally, with tail.

A signal handler is definitely an option, but it can be pretty tricky.
Especially if you are catching things like SEGV (you dare a write()
after that?)

Cheers
-- t

Attachment: signature.asc
Description: Digital signature


Reply to: