Thanks, I installed the attached to simplify a bit further. A nice
consequence of these recent changes is that we get to remove some pragmas.
The first patch is for Gnulib; the other two are for Coreutils.From e14d7e198f96039dbc4fb2118739e6ca1fc4cec6 Mon Sep 17 00:00:00 2001
From: Paul Eggert
D
On 2023-08-08 05:24, Thorsten Kukuk wrote:
Something emacs needs to get fixed. On musl libc systems like Alpine,
you don't have utmp nor wtmp.
Yes, as Bruno mentioned, we know of no way to find the boot time on
Alpine. When Emacs cannot determine the boot time, it pretends that the
system bo
Thorsten Kukuk wrote:
> > What API do you suggest we use instead?
>
> For me clock_gettime works very well:
> https://github.com/thkukuk/utmpx/blob/main/utmp-to-logind.md#determine-boot-time
Now that I've implemented this method in gnulib's 'readutmp' module
and built coreutils with that, I see t
I wrote:
> > (2) The readutmp module should use a runtime 'if' rather than a
> > compile-time
> > #if, in order to dispatch between the systemd backend and the
> > file-based
> > backend.
This patch implements it.
2023-08-08 Bruno Haible
readutmp: Use classic
Thorsten Kukuk wrote:
> > What API do you suggest we use instead?
>
> For me clock_gettime works very well:
> https://github.com/thkukuk/utmpx/blob/main/utmp-to-logind.md#determine-boot-time
Indeed, this provides the boot time with a resolution of 1 µsec. Whereas the
/proc/uptime approach only ha
read_utmp() is not MT-safe.
2023-08-08 Bruno Haible
readutmp: Add comment about multithread-safety.
* lib/readutmp.h (read_utmp): Add comment.
diff --git a/lib/readutmp.h b/lib/readutmp.h
index 1ddb617b28..9377a1b57f 100644
--- a/lib/readutmp.h
+++ b/lib/readutmp.h
@@ -255,7
On Tue, Aug 08, Robert Pluim wrote:
> > On Tue, 8 Aug 2023 14:29:27 +, Thorsten Kukuk said:
> 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 instea
I wrote:
> > (1) The API of the readutmp module should provide unlimited-length
> > ut_user,
> > ut_host etc. fields always. No more #ifdef UT_USER_SIZE.
> > (2) The readutmp module should use a runtime 'if' rather than a
> > compile-time
> > #if, in order to dispatch
> On Tue, 08 Aug 2023 18:11:20 +0200, Bruno Haible 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.
>>
>> W
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?
musl libc runs only on Linux. On Lin
Paul Eggert wrote:
> 0006-readutmp-switch-new-struct-to-struct-timespec.patch
> @@ -150,12 +150,11 @@ struct gl_utmp
> ⎣ ut_addr_v6 [u]int[4] glibc, musl, Android
> */
>
> -# include
> # if !HAVE_DECL_GETUTENT
> struct utmp *getutent (void);
> # endif
> # define
I wrote on 2023-08-02:
> I wrote:
> > The proposed patch is attached.
>
> Oops, I missed a sizeof of the ut_id field. A corrected patch is attached.
Oops, this causes a compilation error on OpenBSD:
In file included from ../../gllib/readutmp.c:22:
../../gllib/readutmp.h:216:50: error: no member
> On Tue, 8 Aug 2023 14:29:27 +, Thorsten Kukuk said:
Thorsten> On Tue, Aug 08, Bruno Haible wrote:
>> Thorsten Kukuk wrote:
>> > On musl libc systems like Alpine,
>> > you don't have utmp nor wtmp.
>>
>> But on Alpine Linux, I don't see a systemd nor a logind dae
On Tue, Aug 08, Bruno Haible wrote:
> Thorsten Kukuk wrote:
> > On musl libc systems like Alpine,
> > you don't have utmp nor wtmp.
>
> But on Alpine Linux, I don't see a systemd nor a logind daemon.
> How are logins meant to be recorded on this system?
They don't record at all.
Which means tool
Thorsten Kukuk wrote:
> On musl libc systems like Alpine,
> you don't have utmp nor wtmp.
But on Alpine Linux, I don't see a systemd nor a logind daemon.
How are logins meant to be recorded on this system?
Bruno
On Mon, Aug 07, Paul Eggert wrote:
> On 2023-08-07 04:22, Bruno Haible wrote:
>
> > sooner than later. My guess is that Fedora and Ubuntu/Debian are only
> > waiting for 'who' (coreutils) and 'last' (util-linux / wtmpdb) to
> > stop accessing these two files.
>
> It's not just those two programs
16 matches
Mail list logo