sys.argv[0] and ps aux

H

Heiko Wundram

Hi all!

Is there some way to set sys.argv[0] on a Unix platform and have the string
which is set show up in the output of ps aux? IIRC when I (re)set argv[0] in
C, the newly set string pops up in ps aux (but I may be wrong here, it's a
long time since I last programmed in C... ;)).

Any hint appreciated!

Heiko.
 
?

=?iso-8859-1?q?Nils_O=2E_Sel=E5sdal?=

And Heiko Wundram said...
Hi all!

Is there some way to set sys.argv[0] on a Unix platform and have the
string which is set show up in the output of ps aux? IIRC when I (re)set
argv[0] in C, the newly set string pops up in ps aux (but I may be wrong
here, it's a long time since I last programmed in C... ;)).
Not any general way in python. Some have a C setproctitle function. On
others you have to do arcane mangeling with the (C) argv array.
In short, no.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top