Blame SOURCES/at-3.1.13-fclose-error.patch

d0c8fe
diff -up at-3.1.13/at.c.fclose at-3.1.13/at.c
d0c8fe
--- at-3.1.13/at.c.fclose	2016-04-20 17:15:00.584327893 +0200
d0c8fe
+++ at-3.1.13/at.c	2016-04-20 17:15:50.453609665 +0200
d0c8fe
@@ -209,7 +209,11 @@ nextjob()
d0c8fe
     jobno = (1 + jobno) % 0xfffff;	/* 2^20 jobs enough? */
d0c8fe
     fprintf(fid, "%05lx\n", jobno);
d0c8fe
 
d0c8fe
-    fclose(fid);
d0c8fe
+    if (ferror(fid))
d0c8fe
+	jobno = EOF;
d0c8fe
+
d0c8fe
+    if (fclose(fid) != 0)
d0c8fe
+	jobno = EOF;
d0c8fe
     return jobno;
d0c8fe
 }
d0c8fe
 
d0c8fe
@@ -498,7 +502,8 @@ writefile(time_t runtimer, char queue)
d0c8fe
     if (ferror(stdin))
d0c8fe
 	panic("Input error");
d0c8fe
 
d0c8fe
-    fclose(fp);
d0c8fe
+    if (fclose(fp) != 0)
d0c8fe
+	panic("Output error");
d0c8fe
 
d0c8fe
     /* Set the x bit so that we're ready to start executing
d0c8fe
      */