public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Jesper Dahl Nyerup <nyerup@one.com>
To: kerolasa@gmail.com
Cc: util-linux <util-linux@vger.kernel.org>
Subject: Re: [PATCH] script: Also flush writes to timing file.
Date: Tue, 18 Feb 2014 11:21:42 +0100	[thread overview]
Message-ID: <20140218102142.GA10373@one.com> (raw)
In-Reply-To: <CAG27Bk2pvdG_Gewxqo8Q=q_2qExCf=u2vvFjmrgvLnYSmvQe+Q@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1078 bytes --]

On Feb 18  10:08, Sami Kerola wrote:
> On 17 February 2014 21:43, Jesper Dahl Nyerup <nyerup@one.com> 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@one.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2014-02-18 10:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-17 21:43 [PATCH] script: Also flush writes to timing file Jesper Dahl Nyerup
2014-02-18 10:08 ` Sami Kerola
2014-02-18 10:21   ` Jesper Dahl Nyerup [this message]
2014-02-18 19:48 ` Jesper Dahl Nyerup
2014-02-18 19:51   ` Jesper Dahl Nyerup
2014-02-21 12:44   ` Karel Zak
2014-02-23 19:20     ` Jesper Dahl Nyerup

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140218102142.GA10373@one.com \
    --to=nyerup@one.com \
    --cc=kerolasa@gmail.com \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox