This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients David.Edelsohn, Dormouse759, hroncok, vstinner
Date 2020-01-29.09:23:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1580289827.39.0.658519673896.issue39460@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2020-01-29 09:23:47vstinnersetrecipients: + vstinner, David.Edelsohn, hroncok, Dormouse759
2020-01-29 09:23:47vstinnersetmessageid: <1580289827.39.0.658519673896.issue39460@roundup.psfhosted.org>
2020-01-29 09:23:47vstinnerlinkissue39460 messages
2020-01-29 09:23:47vstinnercreate