[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#64937: "who" reports funny dates
From: |
Robert Pluim |
Subject: |
bug#64937: "who" reports funny dates |
Date: |
Tue, 08 Aug 2023 18:46:59 +0200 |
>>>>> On Tue, 08 Aug 2023 18:11:20 +0200, Bruno Haible <bruno@clisp.org> said:
Bruno> Robert Pluim wrote:
Thorsten> They don't record at all.
Thorsten> Which means tools like who just don't show anything. And emacs
will
Thorsten> never find out the boot time with the current code.
>>
>> What API do you suggest we use instead?
Bruno> musl libc runs only on Linux. On Linux, you can use this approach
from Gnulib:
Bruno>
https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/readutmp.c;h=4e1d7ec26bef6cba4474433f72c9079b61794b97;hb=HEAD#l96
Bruno> lines 96..150.
So either reading "/proc/uptime" or calling "sysinfo". Iʼm assuming
the former is just the latter written to a file as a string, which we
can then parse again and turn into an integer. How efficient :-)
Bruno> Part of it may already be contained in emacs/src/filelock.c; I can't
tell.
No, that currently uses either sysctl (probably only on *BSD and
macOS) or utmp/wtmp.
Robert
--
- bug#64937: "who" reports funny dates, (continued)
- bug#64937: "who" reports funny dates, Bruno Haible, 2023/08/08
- Message not available
- bug#64937: "who" reports funny dates, Thorsten Kukuk, 2023/08/08
- bug#64937: "who" reports funny dates, Bruno Haible, 2023/08/08
- Message not available
- bug#64937: "who" reports funny dates, Thorsten Kukuk, 2023/08/08
- bug#64937: "who" reports funny dates, Robert Pluim, 2023/08/08
- bug#64937: "who" reports funny dates, Bruno Haible, 2023/08/08
- bug#64937: "who" reports funny dates,
Robert Pluim <=
- Message not available
- bug#64937: "who" reports funny dates, Thorsten Kukuk, 2023/08/08
- bug#64937: "who" reports funny dates, Bruno Haible, 2023/08/08
- bug#64937: boot time on Linux, Bruno Haible, 2023/08/08
- bug#64937: boot time on Linux, Bruno Haible, 2023/08/09
- bug#64937: boot time on Linux, Paul Eggert, 2023/08/09
- bug#64937: boot time on Linux, Bruno Haible, 2023/08/09
- bug#64937: boot time on Linux, Po Lu, 2023/08/09
- bug#64937: boot time on Linux, Bruno Haible, 2023/08/09
- bug#64937: boot time on Linux, Po Lu, 2023/08/09
- bug#64937: boot time on Linux, Paul Eggert, 2023/08/10