From: Karel Zak <kzak@redhat.com>
To: Sami Kerola <kerolasa@iki.fi>
Cc: util-linux@vger.kernel.org
Subject: Re: [PATCH 02/12] script: add struct script_control and remove global variables
Date: Tue, 3 Mar 2015 12:56:45 +0100 [thread overview]
Message-ID: <20150303115645.GQ8046@ws.net.home> (raw)
In-Reply-To: <1424616169-693-3-git-send-email-kerolasa@iki.fi>
On Sun, Feb 22, 2015 at 02:42:39PM +0000, Sami Kerola wrote:
> int main(int argc, char **argv)
...
> + if (optarg && !(ctl.timingfp = fopen(optarg, "w")))
...
> + if ((ctl.typescriptfp = fopen(ctl.fname, ctl.aflg ? "a" : "w")) == NULL) {
Does it make sense to open the files in main() and then later close
it in doshell()? What about add "typescrip" and "timing" filenames
to the control structs and open the files later in do_io() ?
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
next prev parent reply other threads:[~2015-03-03 11:56 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-22 14:42 [PATCH 00/12] pull: script(1) changes Sami Kerola
2015-02-22 14:42 ` [PATCH 01/12] script: remove function prototypes Sami Kerola
2015-02-22 14:42 ` [PATCH 02/12] script: add struct script_control and remove global variables Sami Kerola
2015-03-03 11:56 ` Karel Zak [this message]
2015-02-22 14:42 ` [PATCH 03/12] script: use signalfd() to catch signals Sami Kerola
2015-02-22 14:42 ` [PATCH 04/12] script: use poll() rather than select() Sami Kerola
2015-02-22 14:42 ` [PATCH 05/12] script: merge doinput() and output() functions to do_io() Sami Kerola
2015-02-22 14:42 ` [PATCH 06/12] script: remove io vs signal race Sami Kerola
2015-02-22 14:42 ` [PATCH 07/12] script: add 'Script started' line always to capture file Sami Kerola
2015-02-22 14:42 ` [PATCH 08/12] script: move do_io() content to small functions Sami Kerola
2015-02-22 14:42 ` [PATCH 09/12] script: replace strftime() workaround with CFLAGS = -Wno-format-y2k Sami Kerola
2015-02-22 14:42 ` [PATCH 10/12] script: use correct input type, move comment, and so on Sami Kerola
2015-02-22 14:42 ` [PATCH 11/12] script: use gettime_monotonic() to get timing file timestamps Sami Kerola
2015-02-22 14:42 ` [PATCH 12/12] script: add noreturn function attributes Sami Kerola
2015-03-03 12:05 ` [PATCH 00/12] pull: script(1) changes Karel Zak
2015-03-04 15:49 ` Karel Zak
2015-05-21 11:13 ` Karel Zak
2015-05-24 19:07 ` Sami Kerola
2015-06-02 12:05 ` Karel Zak
2015-06-07 20:25 ` Sami Kerola
2015-06-08 9:15 ` Sami Kerola
2015-06-08 21:01 ` Sami Kerola
2015-06-25 10:00 ` Karel Zak
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=20150303115645.GQ8046@ws.net.home \
--to=kzak@redhat.com \
--cc=kerolasa@iki.fi \
--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