$OpenBSD: patch-base_src_common_xfopen_c,v 1.1 2002/08/28 22:23:29 todd Exp $
--- base/src/common/xfopen.c.orig	Wed Jul 17 12:10:40 2002
+++ base/src/common/xfopen.c	Wed Aug 28 14:26:40 2002
@@ -73,6 +73,11 @@ xfopen(const char *path, const char mode
 void
 xfclose(FILE *f)
 {
+  int retval; 
   if (f != NULL)
-    fclose(f);
+  {
+    retval = fclose(f);
+    if(retval) /* shame we can't get the filename here... */
+      THROW(ExTruncated, format("Closing file failed, error %d\n", retval));
+  }
 }
