#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
+#include <utime.h>
#include <string.h>
#include <strings.h>
#include <ctype.h>
int watch_mbox(char *path, char *prefix, off_t *size, int opt_flags)
{
struct stat st;
+ struct utimbuf timbuf;
int newmail = 0;
if (stat(path, &st) == 0) {
if (st.st_size > *size)
if (access(path, R_OK) == 0) {
+ timbuf.actime = st.st_atime;
+ timbuf.modtime = st.st_mtime;
+
newmail = inspect_mbox(path, prefix, *size, opt_flags);
+
+ utime(path, &timbuf);
}
*size = st.st_size;
return newmail;