Re: [PATCH] improve check if systemd is running

"Craig Small" <[email protected]> ("csmall") Wed, 31 May 2023 20:32:05 +1000
Newsgroups gmane.linux.procps.devel
Message-ID <CALy8Cw7cUu9qCbTDzj+K+mjOkQ=GP-uhGZ4r9w1uY0fFeFSzYQ@mail.gmail.com>
--0000000000006f11e305fcfad5a7
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi Thorsten,
  Apologies for the delay, that patch is in the repository now. That looks
like a better way to check if systemd is running.

 - Craig


On Wed, 31 May 2023 at 01:28, Thorsten Kukuk <[email protected]>
wrote:

>
> Hi,
>
> What about this patch? I haven't seen any comment on it?
>
> Thanks,
>    Thorsten
>
> On Fri, Apr 14, Thorsten Kukuk wrote:
>
> > library: use sd_booted() if systemd is in use
> >
> > sd_get_sessions() will not return ENOENT as error, as this only means
> > that there is no session, not that systemd is not used. Use the
> > recommended sd_booted() function for this.
> >
> > Signed-off-by: Thorsten Kukuk <[email protected]>
>
> --
> Thorsten Kukuk, Distinguished Engineer, Senior Architect, Future
> Technologies
> SUSE Software Solutions Germany GmbH, Frankenstra=C3=9Fe 146, 90461 Nuern=
berg,
> Germany
> Managing Director: Ivo Totev, Andrew Myers, Andrew McDonald, Martje
> Boudien Moerman
> (HRB 36809, AG N=C3=BCrnberg)
>

--0000000000006f11e305fcfad5a7
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hi Thorsten,</div><div>=C2=A0 Apologies for the delay=
, that patch is in the repository now. That looks like a better way to chec=
k if systemd is running.<br></div><div><br></div><div>=C2=A0- Craig</div><d=
iv><br></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D=
"gmail_attr">On Wed, 31 May 2023 at 01:28, Thorsten Kukuk &lt;<a href=3D"ma=
ilto:[email protected]">[email protected]</a>&gt; wrote=
:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.=
8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Hi,<br>
<br>
What about this patch? I haven&#39;t seen any comment on it?<br>
<br>
Thanks,<br>
=C2=A0 =C2=A0Thorsten<br>
<br>
On Fri, Apr 14, Thorsten Kukuk wrote:<br>
<br>
&gt; library: use sd_booted() if systemd is in use<br>
&gt; <br>
&gt; sd_get_sessions() will not return ENOENT as error, as this only means<=
br>
&gt; that there is no session, not that systemd is not used. Use the<br>
&gt; recommended sd_booted() function for this.<br>
&gt; <br>
&gt; Signed-off-by: Thorsten Kukuk &lt;<a href=3D"mailto:[email protected]" ta=
rget=3D"_blank">[email protected]</a>&gt;<br>
<br>
-- <br>
Thorsten Kukuk, Distinguished Engineer, Senior Architect, Future Technologi=
es<br>
SUSE Software Solutions Germany GmbH, Frankenstra=C3=9Fe 146, 90461 Nuernbe=
rg, Germany<br>
Managing Director: Ivo Totev, Andrew Myers, Andrew McDonald, Martje Boudien=
 Moerman<br>
(HRB 36809, AG N=C3=BCrnberg)<br>
</blockquote></div>

--0000000000006f11e305fcfad5a7--