SCCS-vsn: usr.sbin/sendmail/src/stats.c 8.3
-static char sccsid[] = "@(#)stats.c 8.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)stats.c 8.3 (Berkeley) %G%";
#endif /* not lint */
# include "sendmail.h"
#endif /* not lint */
# include "sendmail.h"
(void) time(&Stat.stat_itime);
Stat.stat_size = sizeof Stat;
(void) time(&Stat.stat_itime);
Stat.stat_size = sizeof Stat;
+ fd = open(sfile, O_RDWR);
if (fd < 0)
{
errno = 0;
return;
}
if (fd < 0)
{
errno = 0;
return;
}
+ (void) lockfile(fd, sfile, NULL, LOCK_EX);
if (read(fd, (char *) &stat, sizeof stat) == sizeof stat &&
stat.stat_size == sizeof stat)
{
if (read(fd, (char *) &stat, sizeof stat) == sizeof stat &&
stat.stat_size == sizeof stat)
{