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@xxxxxxxxxx> http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html