Re: [PATCH] script: Also flush writes to timing file.

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

 



On Feb 18  10:08, Sami Kerola wrote:
> On 17 February 2014 21:43, Jesper Dahl Nyerup <nyerup@xxxxxxx> wrote:
> > If both -f and -t are given, flush the timing fd on each write, similar
> > to the behavior on the script fd. This allows playback of still-running
> > sessions, and reduces the risk of ending up with empty timing files when
> > script(1) exits abnormally.
> 
> Instead of flushing all the time how about checking write status at
> the end? See attached patch how that could work.

That's a good idea, and should take care of the scenario where an
abnormal exit leads to empty timings The other use case however,
scriptreplay(1)'ing transcripts while script(1) is still running, would
not be improved upon.

Besides, the man page describes the -f option behavior as `Flush output
after each write`. I would expect this to apply to the timing fd as
well, and honoring this description was the main purpose of my patch.

I think it'd be great if both patches were applied.

J.
-- 
Jesper Dahl Nyerup
Systems Engineer
One.com, nyerup@xxxxxxx

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux