[issue5672] Implement a way to change the python process name

Martin v. Löwis report at bugs.python.org
Wed Dec 29 03:06:48 CET 2010

Martin v. Löwis <martin at v.loewis.de> added the comment:

> Just for the record, I was about to try to do this, when I realized that exposing prctl requires expecting a variable number of arguments with variable types.
> It turns out providing a Python wrapper for such a kind of C API is just a pain.
> There's an implementation though, handling 2 args only (instead of 5):
> https://github.com/seveas/python-prctl/blob/master/_prctlmodule.c#L9
> Considering that this also Linux-only, I don't think it really worths the effort.

It's actually simpler than you think: I don't think any of the existing
controls uses arg4 and arg5. PR_MCE_KILL uses arg3, though. prctl is
really a set of system calls, and should be wrapped as such: each
control needs to be supported specifically. However, several of them
are similar, i.e. take either no argument, or have

Whether it's worth supporting it, I don't know. I stand by my original
proposition: if somebody would contribute this, I'd be in favor of
including it. I'm unlikely to write it on my own from scratch, though.


Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list