git://git.exim.org
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tidying
[exim.git]
/
src
/
src
/
exim_lock.c
diff --git
a/src/src/exim_lock.c
b/src/src/exim_lock.c
index 074a951d1036b9c3b15a01bf8d49df833293391f..dbdd971297583fc26daf6aca9e20fc6167742a26 100644
(file)
--- a/
src/src/exim_lock.c
+++ b/
src/src/exim_lock.c
@@
-87,7
+87,6
@@
the other stuff in os.c, so force the other macros to omit it. */
static void
sigalrm_handler(int sig)
{
static void
sigalrm_handler(int sig)
{
-sig = sig; /* Keep picky compilers happy */
sigalrm_seen = TRUE;
}
sigalrm_seen = TRUE;
}
@@
-584,16
+583,28
@@
else
if (restore_times)
{
struct stat strestore;
if (restore_times)
{
struct stat strestore;
-#ifdef EXIM_HAVE_
OPENAT
+#ifdef EXIM_HAVE_
FUTIMENS
int fd = open(filename, O_RDWR); /* use fd for both get & restore */
struct timespec tt[2];
int fd = open(filename, O_RDWR); /* use fd for both get & restore */
struct timespec tt[2];
- fstat(fd, &strestore);
+ if (fd < 0)
+ {
+ printf("open '%s': %s\n", filename, strerror(errno));
+ yield = 1;
+ goto CLEAN_UP;
+ }
+ if (fstat(fd, &strestore) != 0)
+ {
+ printf("fstat '%s': %s\n", filename, strerror(errno));
+ yield = 1;
+ close(fd);
+ goto CLEAN_UP;
+ }
i = system(command);
tt[0] = strestore.st_atim;
tt[1] = strestore.st_mtim;
i = system(command);
tt[0] = strestore.st_atim;
tt[1] = strestore.st_mtim;
- futimens(fd, tt);
- close(fd);
+
(void)
futimens(fd, tt);
+
(void)
close(fd);
#else
struct utimbuf ut;
#else
struct utimbuf ut;