Re: [PATCH 07/20] uuidd: implement --socket-activation option

Petr Uzel
2012-04-05T07:46:51Z

[-- Attachment #1: Type: text/plain, Size: 2148 bytes --]

On Tue, Apr 03, 2012 at 03:03:19PM +0200, Karel Zak wrote:
> On Thu, Mar 29, 2012 at 06:45:15PM +0200, Petr Uzel wrote:
> > Implement --socket-activatoin option, which is supposed to be used
> > with systemd (or equivalent init system) socket activation mechanism.
> > With this option, the UUID daemon does not create the socket on its own,
> > but instead expect the connection fd to be provided by the calling
> > process.
> >
> > This option is only available if util-linux is configured with
> > --enable-uuidd-socket-activation option. With this configure
> > option, the uuidd is compiled with sd-daemon.c.
> >
[...]
> > diff --git a/configure.ac b/configure.ac
> > index 2140bc5..bb56948 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -1101,6 +1101,18 @@ if test "x$enable_login_chown_vcs" = xyes; then
> > fi
> >
> >
> > +AC_ARG_ENABLE([uuidd-socket-activation],
> > + AS_HELP_STRING([--enable-uuidd-socket-activation], [build uuidd with support for systemd socket activation]),
> > + [], enable_uuidd_socket_activation=no
> > +)
>
> What about --enable-socket-activation (without -uuidd-)?
>
> If you have distro with systemd then all your stuff should compatible
> with the initd (it's detail that currently we have one daemon only).

Good idea.

>
> > +AM_CONDITIONAL(UUIDD_SOCKET_ACTIVATION, test "x$enable_uuidd_socket_activation" = xyes)
>
> USE_SOCKET_ACTIVATION

OK

>
> > +if test "x$enable_uuidd_socket_activation" = xyes; then
> > + AC_DEFINE(UUIDD_SOCKET_ACTIVATION, 1, [Should uuidd support socket activation?])
>
> USE_SOCKET_ACTIVATION

OK

>
> [...]
>
> > static void server_loop(const char *socket_path, const char *pidfile_path,
> > - int debug, int timeout, int quiet, int no_fork)
> > + int debug, int timeout, int quiet, int no_fork,
> > + int no_sock)
>
> hmm... pretty long argument lists :-)
>
> Maybe use struct uuidd_cxt with bit array for all the arguments. If
> yes, then use a separate patch for this change.

OK, I'll change this in v2.

Thanks,

Petr

--
Petr Uzel
IRC: ptr_uzl @ freenode

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]