This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Hi
Consider this:-
----------
#include <stdlib.h>
#include <sys/time.h>
#include <time.h>
int main()
{
time_t now;
struct timeval tvp[2];
time(&now);
tvp[1].tv_sec = now + 100;
utimes("foo.dat", tvp);
exit(0);
}
----------
I have glibc cvs compiled against linux-2.6.0-test2 headers with
"--enable-kernel=2.4.21" running on a 2.4.21 kernel.
The above code fails as evidenced by this:-
root:~# touch foo.dat
root:~# ls -l foo.dat
-rw-r--r-- 1 root root 0 Jul 31 22:13 foo.dat
root:~# gcc -Wall testcase.c -o testcase
root:~# ./testcase
root:~# ls -l foo.dat
-rw-r--r-- 1 root root 0 Jan 1 1970 foo.dat
Strace (attached) shows the fallback to utime() as expected but somehow the
time is wrong.
The testcase works as expected when run under a 2.6.0-test2 kernel using the
same glibc.
Bug?
Thanks
Greg
Attachment:
strace.log
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |