at/at-3.2.5-noabort.patch
Ondřej Pohořelský 61a47903a5 Update to new upstream release
- Removed at-3.1.14-usePOSIXtimers.patch and at-3.2.23-coverity-fix.patch,
    because upstream implemented them
- Defined folder paths without %%{buildroot} in order to make them work
    with latest Makefile changes
- Resolves: rhbz#2048132
2022-03-01 17:30:47 +01:00

45 lines
958 B
Diff

diff -ur b/atd.c a/atd.c
--- b/atd.c 2022-02-22 16:09:15.683717386 +0100
+++ a/atd.c 2022-02-22 16:12:48.992989327 +0100
@@ -344,9 +344,12 @@
*/
pid = fork();
- if (pid == -1)
- perr("Cannot fork");
-
+ if (pid == -1) {
+ lerr("Cannot fork for job execution");
+ free(mailname);
+ free(newname);
+ return;
+ }
else if (pid != 0) {
free(mailname);
free(newname);
@@ -659,16 +662,20 @@
* up.
*/
- if (stat(".", &buf) == -1)
- perr("Cannot stat " ATJOB_DIR);
+ if (stat(".", &buf) == -1) {
+ lerr("Cannot stat " ATJOB_DIR);
+ return next_job;
+ }
if (nothing_to_do && buf.st_mtime == last_chg)
return next_job;
last_chg = buf.st_mtime;
hupped = 0;
- if ((spool = opendir(".")) == NULL)
- perr("Cannot read " ATJOB_DIR);
+ if ((spool = opendir(".")) == NULL) {
+ lerr("Cannot read " ATJOB_DIR);
+ return next_job;
+ }
run_batch = 0;
nothing_to_do = 1;