[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: libsystemd

 ❦ 28 août 2016 15:21 CEST, Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.com> :

>> You mean like libsystemd, which looks in /run to see whether systemd
>> is in use, talks to it if it is, and returns some suitable error
>> code (-ENOSYS?) if it isn't? :-)
> Here's interesting for you. (-:
> Here's libsystemd and Arturo Borrero Gonzalez's code that calls it.
> Please point to the line that checks in /run for systemd running.
> *
> https://github.com/formorer/pkg-conntrack-tools/blob/1ed72f0e691bbd92a78a0a944a9c448260e6ff41/src/systemd.c#L30
> *
> https://github.com/systemd/systemd/blob/master/src/libsystemd/sd-daemon/sd-daemon.c#L404

Line 432. systemd sets NOTIFY_SOCKET environment variable. Previous
lines are variable declaration and safety checks for provided variables.
Modularise.  Use subroutines.
            - The Elements of Programming Style (Kernighan & Plauger)

Attachment: signature.asc
Description: PGP signature

Reply to: