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


Groups > comp.lang.python > #35805 > unrolled thread

Re: changing process name

Started byAdam Tauno Williams <awilliam@whitemice.org>
First post2012-12-30 10:53 -0500
Last post2012-12-30 10:53 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

#35805 — Re: changing process name

FromAdam Tauno Williams <awilliam@whitemice.org>
Date2012-12-30 10:53 -0500
SubjectRe: changing process name
Message-ID<mailman.1466.1356884245.29569.python-list@python.org>
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...

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web