Comment 1 for bug 1300876

Revision history for this message
Richard Brittain (richard-brittain) wrote :

This may affect NFS as well as AFS.
Suggested patch:

--- pbzip2.cpp 2014-04-10 03:01:54.000000001 +0000
+++ pbzip2.cpp-new 2014-04-10 02:50:09.000000001 +0000
@@ -4706,6 +4706,18 @@
    fprintf(stderr, "-------------------------------------------\n");
  } /* for */

+ // Explicit close on stdout if we've been writing there, after all input has been processed
+ if (OutputStdOut == 1)
+ {
+ ret = close(STDOUT_FILENO);
+ if (ret == -1)
+ {
+ ErrorContext::getInstance()->saveError();
+ handle_error(EF_EXIT, 1, "pbzip2: *ERROR: Failed to close output file! Aborting...\n");
+ exit(1);
+ }
+ }
+