]> git.eshelyaron.com Git - emacs.git/commit
process-attributes uses /proc/stat for boot time
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 17 Jun 2025 19:23:41 +0000 (12:23 -0700)
committerEshel Yaron <me@eshelyaron.com>
Wed, 18 Jun 2025 08:15:32 +0000 (10:15 +0200)
commit90b3ca7122838f718eef7d49c6f3d65e7ea8ba8c
treeb8490e9cba8692f0315a39842565a352495325c5
parent2b8ea0032890ed71110007dbc32a7768652c0a28
process-attributes uses /proc/stat for boot time

With a Linux kernel, use /proc/stat rather than get_boot_time
to get boot time, since when Emacs is running in a container
we want the underlying host boot time, not the container boot time.
This should be a better way to fix Bug#63496.
* src/sysdep.c: Do not include boot-time.h.
(get_host_boot_time) [GNU_LINUX || CYGWIN || __ANDROID__]:
New function.
(system_process_attributes) [GNU_LINUX || CYGWIN || __ANDROID__]:
Use it instead of get_boot_time.

(cherry picked from commit 73cebbb87b72effb948f0d73e756a0dc0c55b71c)
src/sysdep.c