From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carlo Zancanaro Subject: Re: Defining user services in Guix. Date: Sun, 23 Apr 2017 09:53:51 +1000 Message-ID: <87lgqs6ltc.fsf@zancanaro.id.au> References: <87o9vowfn0.fsf@gmail.com> <20170422203131.610f2a30@scratchpost.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37057) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d24qo-000376-Ax for guix-devel@gnu.org; Sat, 22 Apr 2017 19:54:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d24ql-0002O9-7M for guix-devel@gnu.org; Sat, 22 Apr 2017 19:54:02 -0400 Received: from mail-it0-x241.google.com ([2607:f8b0:4001:c0b::241]:32792) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d24ql-0002O2-18 for guix-devel@gnu.org; Sat, 22 Apr 2017 19:53:59 -0400 Received: by mail-it0-x241.google.com with SMTP id z67so7029579itb.0 for ; Sat, 22 Apr 2017 16:53:58 -0700 (PDT) In-reply-to: <20170422203131.610f2a30@scratchpost.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Danny Milosavljevic Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain 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 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEwWt2bKTcV+mIZ20oCShLEsLiKqIFAlj77RAACgkQCShLEsLi KqKTLQgAvQZlk68/cEvqvh7XhCORRbOJueDxbNVMusBqnnY8l0GLbsxOLRwq7sCz to4nbL5+i0+LHhEQuqLUDzWds6WtqtGiBFMHHTWLk/hFhGy6v8FvpPuSjs23HzVr IzIJmwG6GVBFpWJJtBZwekLupRWZb+W2kPrjcVxuhYYJ5e2BkMF8tSHawLbjLTj1 vyICQHI+Jeneg7kTp+WoxRoguKWVF2VFAYH1K4aaLo31wT1c6/roYic1Nq1gTzi+ 0H3qEOM9FXZtEsjVHKlzErXnqPTVg/+TCS5DISRonvSE5UzdTEPjlifxw3doST7n UC8PMdU4tDJnuMT+OMLrETidzPaOeA== =px29 -----END PGP SIGNATURE----- --=-=-=--