By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,272 Members | 1,733 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,272 IT Pros & Developers. It's quick & easy.

sys.argv[0] and ps aux

P: n/a
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.

Jul 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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.

Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.