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


Groups > comp.lang.python > #35805

Re: changing process name

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <awilliam@whitemice.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'python': 0.09; 'spawn': 0.09; 'subject:process': 0.09; 'def': 0.10; 'etc...': 0.16; 'from:addr:awilliam': 0.16; 'from:addr:whitemice.org': 0.16; 'from:name:adam tauno williams': 0.16; 'received:72.14.190': 0.16; 'received:72.14.190.87': 0.16; 'received:mail.wmmi.net': 0.16; 'received:wmmi.net': 0.16; 'reply-to:addr:awilliam': 0.16; 'reply- to:addr:whitemice.org': 0.16; 'reproduce': 0.16; 'simplified': 0.16; 'subject:changing': 0.16; 'mon,': 0.16; 'wrote:': 0.17; 'fix': 0.17; 'appears': 0.18; 'module': 0.19; 'received:72.14': 0.20; 'trying': 0.21; 'machine': 0.24; 'allows': 0.25; 'header:In- Reply-To:1': 0.25; 'skip:[ 10': 0.26; 'separate': 0.27; 'this?': 0.28; 'far,': 0.29; "i'm": 0.29; '(and': 0.32; 'problem': 0.33; 'to:addr:python-list': 0.33; 'version': 0.34; "can't": 0.34; 'but': 0.36; 'communicate': 0.37; 'subject:: ': 0.38; 'received:10': 0.38; 'to:addr:python.org': 0.39; 'real': 0.61; 'header:Reply-To:1': 0.68; 'reply-to:no real name:2**0': 0.72; 'andrea': 0.84; 'do:': 0.91; 'processes,': 0.93
Subject Re: changing process name
From Adam Tauno Williams <awilliam@whitemice.org>
To python-list@python.org
Date Sun, 30 Dec 2012 10:53:31 -0500
In-Reply-To <CAF_E5JZiMuQ+4vVFUOHA4mbkmG_mbq+PHsNLVbhJWPJ2e_yUeg@mail.gmail.com>
References <CAF_E5JZiMuQ+4vVFUOHA4mbkmG_mbq+PHsNLVbhJWPJ2e_yUeg@mail.gmail.com>
Content-Type text/plain; charset="UTF-8"
X-Mailer Evolution 3.6.2
Mime-Version 1.0
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
Reply-To awilliam@whitemice.org
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.1466.1356884245.29569.python-list@python.org> (permalink)
Lines 18
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1356884245 news.xs4all.nl 6887 [2001:888:2000:d::a6]:56413
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:35805

Show key headers only | View raw


On Mon, 2012-11-19 at 10:39 +0000, andrea crotti wrote:
> I have very long processes to spawn which I want to lauch as separate
> processes (and communicate with ZeroMQ), but now the problem is that the
> forked process appears in "ps" with the same name as the launcher
> process.
> This is a simplified version of what I'm trying to do:
> def long_sleep():
>     sys.argv[:] = [sys.argv[0]] + ['daemon', 'arguments']
>     time.sleep(20)
> so both the sys.argv reassignment don't work so far, any other way to
> fix this?
> On the real machine I also get zombie processes, but on my machine I
> can't reproduce this, and would also be nice to fix that..


The Python module "procname" allows you change the process name so you
can see it in ps, top, etc...

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


Thread

Re: changing process name Adam Tauno Williams <awilliam@whitemice.org> - 2012-12-30 10:53 -0500

csiph-web