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: signature.asc
Description: PGP signature

Reply via email to