guix-devel
[Top][All Lists]
Advanced

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

Re: Guix shepherd user services


From: Tanguy Le Carrour
Subject: Re: Guix shepherd user services
Date: Sat, 4 May 2019 09:07:18 +0200
User-agent: NeoMutt/20180716

Hello!


Le 05/01, Tanguy Le Carrour a écrit :
> Le 04/29, Tobias Geerinckx-Rice a écrit :
> >  ~ λ cat /home/nckx/.config/shepherd/init.scm  (load "services.scm")
> >  (register-services emacs gpg-agent ibus-daemon jackd)
> >  (action 'shepherd 'daemonize) ; send shepherd into background
> >  (for-each start (list emacs)) ; services to start automatically
> > 
> >  ~ λ cat /home/nckx/.config/shepherd/services.scm  (define emacs
> >    (make <service>
> >      #:provides '(emacs)
> >      #:requires '()
> >      #:start (make-system-constructor "emacs --daemon")
> >      #:stop (make-system-destructor "emacsclient --eval
> > \"(kill-emacs)\"")))
> >  ;; ...much more snipped...
> > 
> >  ~ λ grep shepherd /home/nckx/.xsession  shepherd   # user service manager
> 
> Cooooool! :-)
> Did you write the "much more snipped" by yourself? If yes, is it
> available somewhere? Else, is it documented somewhere? Did you
> copy/paste it from another Guix file?

I've been playing with shepherd and service configurations and it's
actually easier than I thought it would be, at least for "simple"
services. Thanks for showing me the way! :-)

I love it so much that I started/stopped the emacs service (defined with
the snippet above) a few times. It works as expected, except for
the `defunct` processes that hang around. Each time I run `herd stop emacs`,
I get a new one, as if shepherd could not forget about the dead process.
This doesn't prevent me from re-starting the process and using the service,
but it looks… messy!

Am I doing something wrong?!

-- 
Tanguy



reply via email to

[Prev in Thread] Current Thread [Next in Thread]