/srv/irclogs.ubuntu.com/2016/05/13/#upstart.txt

dennisdennisI'm having an issue daemonizing a process, I'm using daemon from /etc/init.d/functions, but when I run service servicename start it just stays in the foreground.  Thoughts on what I should do?07:39
dennisdennisprometheus node_exporter for what it's worth07:39
lnykryndennisdennis: deamon function from initscript does not daemonizy the process, it expect that the process will do classic double-fork08:00
dennisdennisdoes start-stop-daemon make the same assumption, I noticed that seems more like a Canonical thing, I'm on centos6 I suspect I can use Upstart, or maybe I can just do $ nohup /path/elf 2>&1 > logfile &08:02
dennisdennisWhat's the advantage of a service not double forking anyway and leaving the exercise up to the user??08:02
lnykryndennisdennis: well I would guess that it is useful only in the case you want to run it from a different service and get notification if it dies08:04
dennisdennisas in you want it to be a child of something?  Is this a consideration for running the service in a container, that it should not double fork?08:05
dennisdennisor it doesn't really need to08:05
lnykrynthis is really a difference for the sysvinit word, for new inits like upstart or systemd, there is a small difference08:07
lnykrynfor example in systemd, the double forking service has the advantage that with end of the original process it can say "now I am running", service without doublefork is considered running immediately after the original command is run08:10
lnykrynin sysvinit world the double fork also allows to clean execution envioment for the final process08:12
dennisdennisI understand the distinction, thanks for your help08:19
=== ktosiek is now known as czlowiek_deprech
=== czlowiek_deprech is now known as czlowiekdeprecha
=== czlowiekdeprecha is now known as ktosiek

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!