[issue5672] Implement a way to change the python process name
Marcelo Fernández
report at bugs.python.org
Sun Dec 6 18:26:33 CET 2009
Marcelo Fernández <marcelo.fidel.fernandez at gmail.com> added the comment:
Great, piro!
I'm taking a look at it, and it seems to use setproctitle() in BSD, and
writes over the argv array "in most Sys-V like systems"; this includes
Linux?
My question is because I think there's a better and supported method for
Linux, that is, using prctl [1]. I read somewhere that changing argv
causes some inconsistencies between programs who read /sys files, /proc
files... or I don't remember what, but it is, in fact, not the
*recommended* way. Prctl is. :-)
PR_SET_NAME and PR_GET_NAME parameters in prctl.h:
[1] http://www.kernel.org/doc/man-pages/online/pages/man2/prctl.2.html
Could this module be altered to use a prctl call in Linux (>2.6.9)?
Thanks a lot.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5672>
_______________________________________
More information about the Python-bugs-list
mailing list