Message360943
I'm now curious which syscalls are used by the glibc to implement utimensat() and stat().
On a ppc64le Fedora Rawhide running Linux kernel 5.4.8-200.fc31.ppc64le with glibc 2.30.9000, I get:
$ sudo dnf install -y strace # if neeeded
$ strace -o trace ./mtime
(...)
$ grep -E '^(utime|stat)' trace
utimensat(AT_FDCWD, "testfn", [{tv_sec=4386268800, tv_nsec=0} /* 2108-12-30T00:00:00+0000 */, {tv_sec=4386268800, tv_nsec=0} /* 2108-12-30T00:00:00+0000 */], 0) = 0
stat("testfn", {st_mode=S_IFREG|000, st_size=0, ...}) = 0
=> the glibc uses utimensat() and stat() syscalls.
I get the same syscalls on a x64-64 Fedora Rawhide (Linux kernel 5.5.0-0.rc6.git3.1.fc32.x86_64, libc 2.30.9000):
$ grep -E '^(utime|stat)' trace
utimensat(AT_FDCWD, "testfn", [{tv_sec=4386268800, tv_nsec=0} /* 2108-12-30T01:00:00+0100 */, {tv_sec=4386268800, tv_nsec=0} /* 2108-12-30T01:00:00+0100 */], 0) = 0
stat("testfn", {st_mode=S_IFREG|000, st_size=0, ...}) = 0
Note: I use "uname -r" to get the Linux kernel version and I run directly "/lib64/libc.so.6" to get the glibc version. |
|
Date |
User |
Action |
Args |
2020-01-29 09:23:47 | vstinner | set | recipients:
+ vstinner, David.Edelsohn, hroncok, Dormouse759 |
2020-01-29 09:23:47 | vstinner | set | messageid: <1580289827.39.0.658519673896.issue39460@roundup.psfhosted.org> |
2020-01-29 09:23:47 | vstinner | link | issue39460 messages |
2020-01-29 09:23:47 | vstinner | create | |
|