Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Marko Rauhamaa Newsgroups: comp.lang.python Subject: Re: Halfway point between interactive and daemon? Date: Fri, 22 Aug 2014 22:49:01 +0300 Organization: A noiseless patient Spider Lines: 20 Message-ID: <87wqa09ufm.fsf@elektro.pacujo.net> References: <53F634E5.4020206@m4x.org> <0f0ef37d-7d09-483f-8f9b-c63c444f1ea7@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx05.eternal-september.org; posting-host="ff5cf27ef3d5b31f034d3b72bdc27a41"; logging-data="669"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/koH33vEoSpN4a8KAfjZk7" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) Cancel-Lock: sha1:dNnIAPedO++IOfe5nMUl9mjw1QQ= sha1:oa0DbsaIIhVHzsSWcwIegz0UqNI= Xref: csiph.com comp.lang.python:76812 Travis Griggs : > nohup python3 myMain.py 2>&1 > /var/log/mylog.log & I don't recommend this (ubiquitous) technique. You should keep your daemon in the foreground until it has reserved and initialized all the resources it needs and daemonize only then. That way the caller does not have to guess when the service is really available. The proper daemonization procedure is here: Now, with the new systemd standard, there is a way for you to inform the system when a service is up even after backgrounding. I have no personal experience with that technique. Marko