supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: "Laurent Bercot" <ska-supervision@skarnet.org>
To: "Casper Ti. Vector" <caspervector@gmail.com>,
	supervision@list.skarnet.org
Subject: Re: s6-supervise: use of nosetsid
Date: Thu, 03 Dec 2020 17:21:44 +0000	[thread overview]
Message-ID: <emf9a804ac-3ccb-4d15-82fc-f9563c98fdac@elzian> (raw)
In-Reply-To: <X8kbtfETM/jWuG1O@caspervector>

>dcron crashes without it, which is why [1] exists.  The log says
>`setpgid: Operation not permitted'.  I have not investigated further.

  The problem happens here:
  https://github.com/dubiousjim/dcron/blob/master/main.c#L272

  dcron assumes that it's not a session leader when run in the 
foreground.
This is a programming error that should be reported and fixed; if
setpgid(0, 0) fails with EPERM, it just means that the process is
already a session leader, and the program should simply keep running
instead of exiting.

  So, not a valid reason. ;)

  As a workaround, you can avoid nosetsid by just running dcrond under
execline's 'trap', or a shell, or basically any program that will
just forward signals to it.

--
  Laurent


  parent reply	other threads:[~2020-12-03 17:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-03 16:46 Laurent Bercot
2020-12-03 17:09 ` Casper Ti. Vector
     [not found] ` <X8kbtfETM/jWuG1O@caspervector>
2020-12-03 17:21   ` Laurent Bercot [this message]
2020-12-04  6:45     ` Casper Ti. Vector
2020-12-03 19:53 ` Steve Litt
2020-12-03 19:56 ` Guillermo
2020-12-03 21:34   ` Laurent Bercot
2020-12-04  1:46     ` Guillermo
2020-12-04  6:29       ` Laurent Bercot
2020-12-03 21:25 ` eric vidal

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

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

  git send-email \
    --in-reply-to=emf9a804ac-3ccb-4d15-82fc-f9563c98fdac@elzian \
    --to=ska-supervision@skarnet.org \
    --cc=caspervector@gmail.com \
    --cc=supervision@list.skarnet.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.
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 NNTP newsgroup(s).