unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Carlo Zancanaro <carlo@zancanaro.id.au>
To: Danny Milosavljevic <dannym@scratchpost.org>
Cc: guix-devel@gnu.org
Subject: Re: Defining user services in Guix.
Date: Sun, 23 Apr 2017 09:53:51 +1000	[thread overview]
Message-ID: <87lgqs6ltc.fsf@zancanaro.id.au> (raw)
In-Reply-To: <20170422203131.610f2a30@scratchpost.org>

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

On Sat, Apr 22 2017, Danny Milosavljevic wrote:
> Unfortunately, it still doesn't respawn redshift if it dies - it seems
> to require a pid file for that (#:start (make-forkexec-constructor ...
> #:pid-file "xxx.pid") and you have to specify #:respawn? #t. The
> invoked program then has to create "xxx.pid"). I think it would be a
> nice addition to have it monitor the process that
> make-forkexec-constructor invoked - without any pid file. Maybe it's
> even a bug...

I currently use shepherd to manage my local user daemons, and I have run
into this. There's an easy workaround, but there's definitely a bug
lurking here.

The problem is this:

> ;; Send shepherd into the background
> (action 'shepherd 'daemonize)

If you tell shepherd to turn itself into a daemon then it no longer
processes the SIGCHLD that it expects when the child dies.

I've also found that shepherd doesn't properly watch a process that uses
#:pid-file. I start my emacs with --daemon using shepherd and have it
create a pid file, but if emacs dies shepherd doesn't restart it for me.

Other than this, everything else about using shepherd to manage my user
services has worked great. I've been meaning to spend some time looking
into it, but I don't really know where to start in terms of debugging
and fixing this.

Carlo

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

      parent reply	other threads:[~2017-04-22 23:54 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-22 16:50 Defining user services in Guix Mathieu Othacehe
2017-04-22 18:31 ` Danny Milosavljevic
2017-04-22 23:06   ` Ludovic Courtès
2017-04-23 16:27     ` Mathieu Othacehe
2017-04-25  0:02       ` Mekeor Melire
2017-04-25  8:36         ` Ricardo Wurmus
2017-04-27 13:36           ` Ludovic Courtès
2017-04-28 15:22             ` Mathieu Othacehe
2017-05-02 10:02               ` Ludovic Courtès
2017-05-02 19:23                 ` Mathieu Othacehe
2017-05-02 21:21                   ` Ludovic Courtès
2017-05-02 21:44                     ` Ricardo Wurmus
2017-05-03  9:43                       ` Mathieu Othacehe
2017-06-11  1:29                 ` Invoking user shepherd; Was: Re: Defining *user* " Danny Milosavljevic
2017-06-11  8:33                   ` Mathieu Othacehe
2017-06-13  8:00                     ` Ludovic Courtès
2017-06-13  8:06                   ` Ludovic Courtès
2017-06-13 14:32                     ` Danny Milosavljevic
2017-06-13 16:06                       ` Ludovic Courtès
2017-05-02 21:22               ` Defining user " Ludovic Courtès
2017-04-22 23:53   ` Carlo Zancanaro [this message]

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=87lgqs6ltc.fsf@zancanaro.id.au \
    --to=carlo@zancanaro.id.au \
    --cc=dannym@scratchpost.org \
    --cc=guix-devel@gnu.org \
    /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).