Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #4070

Re: Restarting a daemon

Path csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.059
X-Spam-Evidence '*H*': 0.88; '*S*': 0.00; 'python': 0.07; 'instance.': 0.09; 'terminate': 0.09; 'scripts': 0.10; 'pm,': 0.11; 'wrote:': 0.14; 'starts': 0.15; 'command': 0.19; 'tue,': 0.20; 'header:In-Reply-To:1': 0.22; 'itself.': 0.22; 'manually': 0.22; 'runs': 0.24; 'script': 0.26; 'chris': 0.27; 'message- id:@mail.gmail.com': 0.28; 'looks': 0.28; 'server': 0.29; 'sends': 0.29; 'to:addr:python-list': 0.32; 'running': 0.36; 'received:209.85': 0.37; 'exactly': 0.37; 'apr': 0.38; 'received:google.com': 0.38; 'but': 0.38; 'question,': 0.39; 'set': 0.39; 'to:addr:python.org': 0.39; 'received:209': 0.39; 'would': 0.40; 'header:Received:5': 0.40; '2011': 0.62; '26,': 0.68; 'here.': 0.68; 'daemon?': 0.84; 'have?': 0.84; 'received:209.85.210.174': 0.84; 'received:mail- iy0-f174.google.com': 0.84; 'restart': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=cOhpU8YhoI6XwCoSn+FOnXKyCUWuFJx9EPILr+mZGRw=; b=kHp3TMwCfblhY5mhIr3YfgeP3tnUWDj2sL+UAKCtVha5/HJGUZ3o4hF/TSn6R4mpCy iEbo9fmoKfqcWbPc1rj+bLdMm01E+W2/n41apZ6QY5/W8SfqgmSe0n4ijpm01HIfZL13 CXUlMVZQb9oWuaOOUYakkIpQrT364Ax3I/yRU=
DomainKey-Signature a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=Cw0Wa0379hiSfixVrQhv+kHAFfUOHObNoKJkEM1yT/DGeE+rQVv6WEcfkPKKNXqwW+ 7lUfXM2tzOew/tvewRjD65GJVjfajJBNsgwz6NcMZOxeNOlCspuIPRmdXrr5bwsEt/nP yruxT8s1sVUchvLJv7+1d9aljEo2EGblDZt2A=
MIME-Version 1.0
In-Reply-To <ip6ct5$gi3$1@dough.gmane.org>
References <ip6ct5$gi3$1@dough.gmane.org>
Date Wed, 27 Apr 2011 05:38:48 +1000
Subject Re: Restarting a daemon
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.865.1303846731.9059.python-list@python.org> (permalink)
Lines 20
NNTP-Posting-Host 82.94.164.166
X-Trace 1303846732 news.xs4all.nl 32470 [::ffff:82.94.164.166]:33762
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:4070

Show key headers only | View raw


On Tue, Apr 26, 2011 at 10:13 PM, Jeffrey Barish
<jeff_barish@earthlink.net> wrote:
> Not exactly a Python question, but I thought I would start here.
>
> I have a server that runs as a daemon.  I can restart the server manually
> with the command
>
> myserver restart
>
> This command starts a new myserver which first looks up the pid for the one
> that is running and sends it a terminate signal.  The new one then
> daemonizes itself.

What job manager do you have? Can you set up a script in /etc/init.d
or /etc/init and then use that to restart the daemon? Upstart scripts
can be managed with the 'initctl' command, for instance.

Chris Angelico

Back to comp.lang.python | Previous | Next | Find similar


Thread

Re: Restarting a daemon Chris Angelico <rosuav@gmail.com> - 2011-04-27 05:38 +1000

csiph-web