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: 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 To: python-list@python.org Date: Sun, 30 Dec 2012 10:53:31 -0500 In-Reply-To: References: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 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...