[Python-Dev] Pondering some changes to python.c...
Mon, 8 Apr 2002 14:25:23 -0600
On Mon, Apr 08, 2002 at 10:33:21AM +0200, M.-A. Lemburg wrote:
>-1 on making it the default -- there are programs relying on this.
Interesting point... One of the main reasons that I wanted this was that
some programs rely on it *NOT* being there. Like "killall", etc...
>+1 on providing a sys module interface for this so that programs
>can choose the name on their own.
Yeah, I was thinking about that one. It's kind of complicated,
unfortunately. To do it right, you need to muck around with the original
argv and envp arguments. So, it will cause side-effects to any code
calling the main Python entry point if we do it in there... Besides, we
really end the envp anyway (which Py_Main doesn't take).
So, I'm thinking there would need to be a new entry point like
"Py_ArgsSetup(int argc, char ***argv, char ***envp)", which would need to be
called to set this up. You'd call "Py_ArgsSetup(argc, &argv, &envp)", and
it would re-allocate argv and envp, and use the original data space for
storing the process string.
I have never been able to conceive how any rational being could propose
happiness to himself from the exercise of power over others. -- Jefferson
Sean Reifschneider, Inimitably Superfluous <firstname.lastname@example.org>
tummy.com - Linux Consulting since 1995. Qmail, KRUD, Firewalls, Python