:: Re: [DNG] tiny service state api [W…
Góra strony
Delete this message
Reply to this message
Autor: KatolaZ
Data:  
Dla: dng
Temat: Re: [DNG] tiny service state api [WAS: Fwd: init system agnosticism]
On Fri, Apr 14, 2017 at 10:57:01AM +0200, Enrico Weigelt, metux IT consult wrote:

[cut]

> * srvmgt_daemonize()
>   --> detach from controlling terminal, etc
> * srvmgt_droppriv(...)
>   --> drop root privileges (if we are still root)
>   --> several versions, eg. with fetching the target uid/gid from env
> * srvmgt_report_state(...)
>   --> report the service state to the supervisor
>   --> states could be eg.
>     * SRVMGT_STATE_STARTUP     -- still within the startup phase
>     * SRVMGT_STATE_READY_LOCAL -- ready for local clients only
>     * SRVMGT_STATE_READY_ALL   -- ready for all clients
>     * SRVMGT_STATE_BUSY        -- too busy to process new requests
>     * SRVMGT_STATE_SHUTDOWN    -- shutting down, still finishing
>                                       queued requests
>     * SRVMGT_STATE_DEFERRED    -- temporarily can't accept new
>                                       requests (eg. overload)
>     * SRVMGT_STATE_WAITING     -- wait for resource (eg. printer
>                                       needs paper or ink)
>     * SRVMGT_STATE_OFFLINE     -- completely offline (eg. due some
>                                       fatal error)

>
> For start, we'd just write a small library, that logs to syslog,
> perhaps maintains some pidfiles (maybe even a *compile-time* option
> to route directly to libsystemd), then patch up packages that currently
> use libsystemd to use our new one.
>


I personally don't see why one would like to redo libsystemd0 from
scratch, as you seem so kee of doing.

Go on down your path, but I suspect not many people would cheer at you
in this camp...

HND

KatolaZ

-- 
[ ~.,_  Enzo Nicosia aka KatolaZ - GLUGCT -- Freaknet Medialab  ]  
[     "+.  katolaz [at] freaknet.org --- katolaz [at] yahoo.it  ]
[       @)   http://kalos.mine.nu ---  Devuan GNU + Linux User  ]
[     @@)  http://maths.qmul.ac.uk/~vnicosia --  GPG: 0B5F062F  ] 
[ (@@@)  Twitter: @KatolaZ - skype: katolaz -- github: KatolaZ  ]