Changes committed to git://oss.sgi.com/kenj/pcp.git dev
src/libpcp/src/logutil.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
commit bbbc0244d59ada586ac71370ed6bde5732a68261
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Wed Nov 20 06:40:35 2013 +1100
libpcp/logutil.c - better cleanup of uncompressed temporary files
Noticed on a system that $PCP_TMP_DIR contained a number of files
like this ...
0DF26i: PCP archive (V.2) log volume #0 host: <somehost>
1RG2GO: PCP archive (V.2) log volume #0 host: <someotherhost>
1WFJrH: PCP archive (V.2) log volume #0 host: <somehost>
These files come from uncompressing the data volume of a PCP archive.
There was a gap between the creation of the temporary file and the
uncompress command finishing where SIGINT (or similar interruption)
would have left the partially uncompressed temporary file in
$PCP_TMP_DIR.
Moved the unlink() to just after the create+open and before the
execution of the uncompress command.
|