Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
utimes(2) returning EINVAL
Hello,
while repeatedly running rsync I noticed that file access and
modification times are not set correctly anymore; and indeed running
the attached program fails on a NetBSD/i386 4.99.65 system (userland
is ~ 4.99.64):
$ touch file
$ ./a.out file
a.out: utimes: Invalid argument
Any hints?
TIA, Jukka
--
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~
#include <sys/time.h>
#include <err.h>
int main(int argc, char *argv[])
{
struct timeval times[2];
times[0].tv_sec = times[0].tv_usec = 0;
times[1].tv_sec = times[1].tv_usec = 0;
if (utimes(argv[1], times) == -1)
err(1, "utimes");
return 0;
}
Home |
Main Index |
Thread Index |
Old Index