unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Tanguy Le Carrour <tanguy@bioneland.org>
To: Tobias Geerinckx-Rice <me@tobias.gr>
Cc: guix-devel@gnu.org
Subject: Re: Guix shepherd user services
Date: Sat, 4 May 2019 09:07:18 +0200	[thread overview]
Message-ID: <20190504070718.xdt6i5475xydvh7i@melmoth> (raw)
In-Reply-To: <20190501090058.q34wlnxhbn6k3hwg@melmoth>

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	other threads:[~2019-05-04  7:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-29 19:57 Guix shepherd user services Tanguy Le Carrour
2019-04-29 20:10 ` Tobias Geerinckx-Rice
2019-05-01  9:00   ` Tanguy Le Carrour
2019-05-04  7:07     ` Tanguy Le Carrour [this message]
2019-05-04 11:45       ` Tobias Geerinckx-Rice
2019-05-08  7:30         ` Tanguy Le Carrour
  -- strict thread matches above, loose matches on Subject: below --
2019-02-10 15:02 Pierre Neidhardt
2019-02-10 17:21 ` Gábor Boskovits
2019-02-10 18:22   ` Pierre Neidhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190504070718.xdt6i5475xydvh7i@melmoth \
    --to=tanguy@bioneland.org \
    --cc=guix-devel@gnu.org \
    --cc=me@tobias.gr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).