]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
report write error. [RT #19360]
authorMark Andrews <marka@isc.org>
Mon, 2 Mar 2009 02:42:50 +0000 (02:42 +0000)
committerMark Andrews <marka@isc.org>
Mon, 2 Mar 2009 02:42:50 +0000 (02:42 +0000)
bin/tests/cfg_test.c

index 77c9712ca4fac4e19f9b8c742e1ad65aecdc08c8..d7225e709d888a1a81a4cef046878b9d0e3ab41c 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: cfg_test.c,v 1.19 2007/06/19 23:46:59 tbox Exp $ */
+/* $Id: cfg_test.c,v 1.20 2009/03/02 02:42:50 marka Exp $ */
 
 /*! \file */
 
@@ -147,5 +147,10 @@ main(int argc, char **argv) {
                isc_mem_stats(mctx, stderr);
        isc_mem_destroy(&mctx);
 
-       return (0);
+       fflush(stdout);
+       if (ferror(stdout)) {
+               fprintf(stderr, "write error\n");
+               return (1);
+       } else
+               return (0);
 }