]> git.eshelyaron.com Git - emacs.git/commit
process-attributes now uses get_boot_time
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 15 Jun 2025 22:02:07 +0000 (15:02 -0700)
committerEshel Yaron <me@eshelyaron.com>
Wed, 18 Jun 2025 08:14:22 +0000 (10:14 +0200)
commitc7783296fe7d3438bc389fd87f34275b1137b8f4
treeadb8839ab586f020aa0f5e6f53461ddad8520b4f
parent58e5b9223b2efd70016c4777203ee26a00c10126
process-attributes now uses get_boot_time

I noticed this issue while looking into Bug#63496.
GNU Emacs does not infer the boot time consistently on GNU/Linux
and similar platforms: android_notifications_notify_1 and
get_boot_sec use Gnulib’s boot-time module, but process-attributes
has idiosyncratic code that evidently predates that module.
The idiosyncratic code returns an unstable etime, which is a minor bug.
Simplify process-attributes by just using Gnulib.
This returns a stable etime.
It may also fix Bug#63496; if not, we can fix Gnulib later.
* src/sysdep.c: Include <boot-time.h>.
(get_up_time) [GNU_LINUX || CYGWIN || __ANDROID__]: Remove.
(system_process_attributes) [GNU_LINUX || CYGWIN || __ANDROID__]:
Use get_boot_time instead of get_up_time.

(cherry picked from commit 477112ebc3497e9529cc06b24134d85d17c642ee)
src/sysdep.c