On Mon, 28 Jul 2025 at 17:31, Andrew Bower <
[email protected]> wrote:
I think we should do this:
Remove sd_booted() check
if sd_get_sessions()
< 0 && != ENOENT: error
> 0: show sessions
default: fallback to utmp
This should deal with:
1. systemd and elogind with some login sessions: show sessions
2. neither systemd nor elogind: fallback to utmp reading
3. systemd and elogind with no sessions: show nothing, as now, but via
fallback utmp route with no practical difference.
I don't see a downside from this approach.
I think this is the correct way too. I'll double check that 0 user path
because it looks odd, but its probably doing the right thing.
- Craig
<div dir="ltr"><div dir="ltr">On Mon, 28 Jul 2025 at 17:31, Andrew Bower <<a href="mailto:
[email protected]">
[email protected]</a>> wrote:</div><div class="gmail_quote gmail_quote_container"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.
8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I think we should do this:<br>
Remove sd_booted() check<br>
if sd_get_sessions()<br>
< 0 && != ENOENT: error<br>
> 0: show sessions<br>
default: fallback to utmp<br>
This should deal with:<br>
1. systemd and elogind with some login sessions: show sessions<br>
2. neither systemd nor elogind: fallback to utmp reading<br>
3. systemd and elogind with no sessions: show nothing, as now, but via<br> fallback utmp route with no practical difference.<br>
I don't see a downside from this approach.<br></blockquote><div>I think this is the correct way too. I'll double check that 0 user path because it looks odd, but its probably doing the right thing.</div><div><br></div><div> - Craig</div><div><br>
</div></div></div>
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)