Re: Bug#791857: ITP: daemonize -- tool to run a command as a daemon
On Thu, Jul 09, 2015 at 10:25:04AM -0700, Clint Byrum wrote: Yes, all problems are just nails for that hammer! Whilst there is some concern about it growing its remit to other, unrelated tasks, daemon management is exactly what it is for. -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20150713102307.ga8...@chew.redmars.org
Re: Bug#791857: ITP: daemonize -- tool to run a command as a daemon
On Thu, 09 Jul 2015 17:39:27 -0700, Russ Allbery r...@debian.org wrote: It looks like you maintain daemon, in fact. :) For appropriate values of maintain, yes. Which is why I asked for the difference between daemonize and daemon(1). Greetings Marc -- -- !! No courtesy copies, please !! - Marc Haber |Questions are the | Mailadresse im Header Mannheim, Germany | Beginning of Wisdom | http://www.zugschlus.de/ Nordisch by Nature | Lt. Worf, TNG Rightful Heir | Fon: *49 621 72739834 -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/e1zdyne-0007cb...@swivel.zugschlus.de
Re: Bug#791857: ITP: daemonize -- tool to run a command as a daemon
On Jul 09, Martín Ferrari tin...@tincho.org wrote: I can say that it does: start-stop-daemon misses some functionality you need for programs that don't daemonise and log to stdout/stderr, which is something I needed only last week. Having said that, I think that This looks like a job for systemd. -- ciao, Marco pgptj83U7YFVx.pgp Description: PGP signature
Re: Bug#791857: ITP: daemonize -- tool to run a command as a daemon
Excerpts from md's message of 2015-07-09 10:18:50 -0700: On Jul 09, Martín Ferrari tin...@tincho.org wrote: I can say that it does: start-stop-daemon misses some functionality you need for programs that don't daemonise and log to stdout/stderr, which is something I needed only last week. Having said that, I think that This looks like a job for systemd. Yes, all problems are just nails for that hammer! -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/1436462682-sup-4...@fewbar.com
Re: Bug#791857: ITP: daemonize -- tool to run a command as a daemon
2015-07-09 19:25 GMT+02:00 Clint Byrum spam...@debian.org: Excerpts from md's message of 2015-07-09 10:18:50 -0700: On Jul 09, Martín Ferrari tin...@tincho.org wrote: I can say that it does: start-stop-daemon misses some functionality you need for programs that don't daemonise and log to stdout/stderr, which is something I needed only last week. Having said that, I think that This looks like a job for systemd. Yes, all problems are just nails for that hammer! Systemd does starting/stopping and managing services very well. The tool you want to use in this case is systemd-run, which starts a transient service for the command you want to run in the background. Cheers, Matthias -- I welcome VSRE emails. See http://vsre.info/ -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/caknhny8fd4hbr76bfw2yxq+hkxp69v5fydwweb7bxdzybds...@mail.gmail.com
Re: Bug#791857: ITP: daemonize -- tool to run a command as a daemon
I can say that it does: start-stop-daemon misses some functionality you need for programs that don't daemonise and log to stdout/stderr, which is something I needed only last week. Having said that, I think that This looks like a job for systemd. Yes, all problems are just nails for that hammer! Systemd does starting/stopping and managing services very well. The tool you want to use in this case is systemd-run, which starts a transient service for the command you want to run in the background. Cheers, Matthias Of course, we shouldn't expect everyone to use systemd-run because that's locking into an init system which should quite obviously be avoided. It does seem like daemonize serves a very unique purpose where start-stop-daemon is a bit overkill or cumbersome. It's obviously something that would never be used in an init script where start-stop-daemon is actually appropriate. However, I can see a few situations where I would launch this from a script. Not only that... but I can see myself rewriting some scripts to make use of this if it were included in Debian. Just my two cents. -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/CAL4L7=AtLW0RfiM0-v0Y=bpwsa9om3ky0epo4d-_qwyptiz...@mail.gmail.com
Re: Bug#791857: ITP: daemonize -- tool to run a command as a daemon
Marc Haber mh+debian-de...@zugschlus.de writes: On Thu, 9 Jul 2015 19:18:50 +0200, m...@linux.it (Marco d'Itri) wrote: On Jul 09, Martín Ferrari tin...@tincho.org wrote: I can say that it does: start-stop-daemon misses some functionality you need for programs that don't daemonise and log to stdout/stderr, which is something I needed only last week. Having said that, I think that This looks like a job for systemd. How do I have that functionality on Debian/kFreeBSD? runit, daemontools, supervisor, launchtool... reinventing this wheel is so popular that you can find a wealth of different styles of tread. It looks like you maintain daemon, in fact. :) This is a little like uploading yet another MTA. People are reasonably asking do we need *another* one? -- Russ Allbery (r...@debian.org) http://www.eyrie.org/~eagle/ -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/877fq8ongg@hope.eyrie.org
Re: Bug#791857: ITP: daemonize -- tool to run a command as a daemon
On Wed, 08 Jul 2015 16:45:12 -0400, Sandro Tosi mo...@debian.org wrote: * Package name: daemonize Version : 1.7.6 Upstream Author : Brian Clapper, b...@clapper.org * URL : http://software.clapper.org/daemonize/ * License : BSD Programming Lang: C Description : tool to run a command as a daemon Other than being alive upstream, does that have advantages over daemon(1)? Greetings Marc -- -- !! No courtesy copies, please !! - Marc Haber |Questions are the | Mailadresse im Header Mannheim, Germany | Beginning of Wisdom | http://www.zugschlus.de/ Nordisch by Nature | Lt. Worf, TNG Rightful Heir | Fon: *49 621 72739834 -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/e1zd5bn-0005qa...@swivel.zugschlus.de
Re: Bug#791857: ITP: daemonize -- tool to run a command as a daemon
On 09/07/15 02:19, Guillem Jover wrote: Most programs that are designed to be run as daemons do that work for themselves. However, you’ll occasionally run across one that does not. When you must run a daemon program that does not properly make itself into a true Unix daemon, you can use daemonize to force it to run as a true daemon. Does this have any advantage over start-stop-daemon? I can say that it does: start-stop-daemon misses some functionality you need for programs that don't daemonise and log to stdout/stderr, which is something I needed only last week. Having said that, I think that 'daemon' does everything that 'daemonize' does and more. -- Martín Ferrari (Tincho) -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/559e75eb.2060...@tincho.org
Re: Bug#791857: ITP: daemonize -- tool to run a command as a daemon
Of course, we shouldn't expect everyone to use systemd-run because that's locking into an init system which should quite obviously be avoided. That, again. The person who suggested using systemd merely pointed out that the task of turning a regular process into daemon is trivially solvable using systemd-run. This kind of implies that if the OP uses systemd, they could just read the appropriate manual page and have their task solved. When I read it, it came across a bit different from that. It sounded like that was to be considered the approach instead of one option. Related to a bit further down... It does seem like daemonize serves a very unique purpose where start-stop-daemon is a bit overkill or cumbersome. It's obviously something that would never be used in an init script where start-stop-daemon is actually appropriate. However, I can see a few situations where I would launch this from a script. Not only that... but I can see myself rewriting some scripts to make use of this if it were included in Debian. Two points: * It seems you have missed a message in this thread mentioning the `daemon` package which is in Debian (since ages) and is able to daemonize a regular program. You're right. I missed (spaced on) that note. Which helped contribute to my feelings above. I guess my argument is invalid. I'm sorry for the noise then! * Not to bash the maintainers of `start-stop-daemon` but this program is sort of a hack as it can't do most of what's expected from a daemonizer: it can't capture the standard output streams of the child it spawns and redirect them to syslog, and it can't restart the child when that dies. It can be a pain in the bum, but does (mostly) work... I need to start playing with daemon! -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/CAL4L7=d7dpzvsfixytjkkammqqgaqgwuma7a0axylkmhyx-...@mail.gmail.com
Re: Bug#791857: ITP: daemonize -- tool to run a command as a daemon
On Thu, 9 Jul 2015 19:18:50 +0200, m...@linux.it (Marco d'Itri) wrote: On Jul 09, Martín Ferrari tin...@tincho.org wrote: I can say that it does: start-stop-daemon misses some functionality you need for programs that don't daemonise and log to stdout/stderr, which is something I needed only last week. Having said that, I think that This looks like a job for systemd. How do I have that functionality on Debian/kFreeBSD? Greetings Marc -- -- !! No courtesy copies, please !! - Marc Haber |Questions are the | Mailadresse im Header Mannheim, Germany | Beginning of Wisdom | http://www.zugschlus.de/ Nordisch by Nature | Lt. Worf, TNG Rightful Heir | Fon: *49 621 72739834 -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/e1zdi7l-0007rg...@swivel.zugschlus.de
Re: Bug#791857: ITP: daemonize -- tool to run a command as a daemon
On Thu, 9 Jul 2015 13:10:35 -0500 Michael Lustfield mich...@lustfield.net wrote: [...] Of course, we shouldn't expect everyone to use systemd-run because that's locking into an init system which should quite obviously be avoided. That, again. The person who suggested using systemd merely pointed out that the task of turning a regular process into daemon is trivially solvable using systemd-run. This kind of implies that if the OP uses systemd, they could just read the appropriate manual page and have their task solved. It does seem like daemonize serves a very unique purpose where start-stop-daemon is a bit overkill or cumbersome. It's obviously something that would never be used in an init script where start-stop-daemon is actually appropriate. However, I can see a few situations where I would launch this from a script. Not only that... but I can see myself rewriting some scripts to make use of this if it were included in Debian. Two points: * It seems you have missed a message in this thread mentioning the `daemon` package which is in Debian (since ages) and is able to daemonize a regular program. * Not to bash the maintainers of `start-stop-daemon` but this program is sort of a hack as it can't do most of what's expected from a daemonizer: it can't capture the standard output streams of the child it spawns and redirect them to syslog, and it can't restart the child when that dies. -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20150709232321.ebd0334a53d541327ca5d...@domain007.com
Bug#791857: ITP: daemonize -- tool to run a command as a daemon
Package: wnpp Severity: wishlist Owner: Sandro Tosi mo...@debian.org * Package name: daemonize Version : 1.7.6 Upstream Author : Brian Clapper, b...@clapper.org * URL : http://software.clapper.org/daemonize/ * License : BSD Programming Lang: C Description : tool to run a command as a daemon As defined in W. Richard Stevens’ 1990 book, UNIX Network Programming (Addison-Wesley, 1990), a daemon is “a process that executes ‘in the background’ i.e., without an associated terminal or login shell) either waiting for some event to occur, or waiting to perform some specified task on a periodic basis.” Upon startup, a typical daemon program will: . * Close all open file descriptors (especially standard input, standard output and standard error) * Change its working directory to the root filesystem, to ensure that it doesn’t tie up another filesystem and prevent it from being unmounted * Reset its umask value * Run in the background (i.e., fork) * Disassociate from its process group (usually a shell), to insulate itself from signals (such as HUP) sent to the process group * Ignore all terminal I/O signals * Disassociate from the control terminal (and take steps not to reacquire one) * Handle any SIGCLD signals . Most programs that are designed to be run as daemons do that work for themselves. However, you’ll occasionally run across one that does not. When you must run a daemon program that does not properly make itself into a true Unix daemon, you can use daemonize to force it to run as a true daemon. -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20150708204512.10985.18038.reportbug@debian-amd64-800
Re: Bug#791857: ITP: daemonize -- tool to run a command as a daemon
Hi! On Wed, 2015-07-08 at 16:45:12 -0400, Sandro Tosi wrote: Package: wnpp Severity: wishlist Owner: Sandro Tosi mo...@debian.org * Package name: daemonize Version : 1.7.6 Upstream Author : Brian Clapper, b...@clapper.org * URL : http://software.clapper.org/daemonize/ * License : BSD Programming Lang: C Description : tool to run a command as a daemon Most programs that are designed to be run as daemons do that work for themselves. However, you’ll occasionally run across one that does not. When you must run a daemon program that does not properly make itself into a true Unix daemon, you can use daemonize to force it to run as a true daemon. Does this have any advantage over start-stop-daemon? Thanks, Guillem -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20150709001908.ga9...@gaara.hadrons.org