: fileio1 - Keep logfile open
PATCH 1/1 : fileio1 - Keep logfile open
From: Sukadev Bhattiprolu <[email protected]>
Date: Wed, 20 Jan 2010 14:31:14 -0800
Subject: [PATCH]: fileio1 - Keep logfile open
In an attempt to close any as-yet uncheckpointable files that are open, the test case closes all files. But in the process even the log file (which is checkpointable) is also closed even though the test writes a lot to the log subsequently.
Signed-off-by Sukadev Bhattiprolu <[email protected]>
--- fileio/fileio1.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
fileio/fileio1.c +4 -1
@@ -273,7 +273,10 @@ int main(int argc, char *argv[])* Cannot checkpoint process with open device files yet; */ printf ("Closing stdio fds and writing messages to %s\n" , log_fnam); -for (i=0 ; i<100 ; i++)close (i); +for (i=0 ; i<100 ; i++) { +if (i !=fileno (logfp)) +close (i); + }/* * Announce that we are now prepared for a checkpoint
Signature · 1 line
1.6.0.4