[Python-Dev] Pondering some changes to python.c...
Martin v. Loewis
09 Apr 2002 00:18:18 +0200
Sean Reifschneider <firstname.lastname@example.org> writes:
> On Linux and a few other systems, setting the ps string requires re-writing
> the block of memory starting at argv. If the data in envp is
> allocated next to argv, you can also make use of that (so that you can
> write strings longer than "python testscript" in length).
That's very hacky, IMO, and something I would not like to see
generally available. If you need that feature, embed Python.
Or, write an extension module allowing to rewrite argc/argv. ps
manages to find out what the arguments are, so it should be possible
to find (and overwrite) them even without getting them as arguments to