Blame SOURCES/at-3.1.18-noabort.patch

d3b522
diff -up at-3.1.18/atd.c.noabort at-3.1.18/atd.c
d3b522
--- at-3.1.18/atd.c.noabort	2016-03-23 12:49:15.147520116 +0100
d3b522
+++ at-3.1.18/atd.c	2016-03-23 12:49:15.148520138 +0100
d3b522
@@ -349,9 +349,12 @@ run_file(const char *filename, uid_t uid
d3b522
      */
d3b522
 
d3b522
     pid = fork();
d3b522
-    if (pid == -1)
d3b522
-	perr("Cannot fork");
d3b522
-
d3b522
+    if (pid == -1) {
d3b522
+	lerr("Cannot fork for job execution");
d3b522
+	free(mailname);
d3b522
+	free(newname);
d3b522
+	return;
d3b522
+    }
d3b522
     else if (pid != 0) {
d3b522
 	free(mailname);
d3b522
 	free(newname);
d3b522
@@ -669,15 +672,19 @@ run_loop()
d3b522
      * up.
d3b522
      */
d3b522
 
d3b522
-    if (stat(".", &buf) == -1)
d3b522
-	perr("Cannot stat " ATJOB_DIR);
d3b522
+    if (stat(".", &buf) == -1) {
d3b522
+	lerr("Cannot stat " ATJOB_DIR);
d3b522
+        return next_job;
d3b522
+    }
d3b522
 
d3b522
     if (nothing_to_do && buf.st_mtime <= last_chg)
d3b522
 	return next_job;
d3b522
     last_chg = buf.st_mtime;
d3b522
 
d3b522
-    if ((spool = opendir(".")) == NULL)
d3b522
-	perr("Cannot read " ATJOB_DIR);
d3b522
+    if ((spool = opendir(".")) == NULL) {
d3b522
+	lerr("Cannot read " ATJOB_DIR);
d3b522
+        return next_job;
d3b522
+    }
d3b522
 
d3b522
     run_batch = 0;
d3b522
     nothing_to_do = 1;