GNU bug report logs -
#54986
[PATCH] gnu: mpd: Add support for socket activation.
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
> +(define (shepherd-endpoint->sexp endpoint)
> + (match endpoint
> + (($ <shepherd-endpoint> address
> + name style backlog socket-owner socket-
group
> + socket-directory-permissions)
> + `(endpoint
> + ,(match (sockaddr:fam address)
> + ((? (cute = <> AF_INET) _)
> + `(make-socket-addr AF_INET
> + ,(sockaddr:addr address)
> + ,(sockaddr:port address)))
Liliana Marie Prikler schreef op za 23-04-2022 om 16:39 [+0200]:
> + (list #$@(map shepherd-endpoint->sexp
> + (mpd-configuration-shepherd-endpoints config)))
For hygiene reasons, should 'shepherd-endpoint->sexp' use @?
`((@ (the module) endpoint)
,(match [...]
((@ [...] make-socket-addr (@ [...] AF_UNIX) ...)
...))
That way, no assumptions are made on what modules are imported and it
avoids hygiene problems like in
;; There are two ‘endpoints’ here: the ‘API endpoint’,
;; and Shepherd endpoints.
#~(let ((endpoint "http://localhost:1234/api"))
(make-systemd-constructor
(list #$(file-append soft "/bin/ware")
"--endpoint" #$endpoint)
(list (shepherd-endpoint->sexp ...))))
Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 2 years and 34 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.