[Python-Dev] Should execv() call _run_exitfuncs()? If not, should _run_exitfuncs() be private?

2009-01-31 Thread Rocky Bernstein
As a hobby I've been writing a debugger. One of the commands,"restart", works by calling an execv(). You may need to do this when the program you are debugging is threaded or when one needs to ensure that all program state is reinitialized. Recently, I added remote debugging via TCP sockets and no

Re: [Python-Dev] Should execv() call _run_exitfuncs()? If not, should _run_exitfuncs() be private?

2009-01-31 Thread Guido van Rossum
On Sat, Jan 31, 2009 at 4:55 PM, Rocky Bernstein wrote: > As a hobby I've been writing a debugger. One of the > commands,"restart", works by calling an execv(). You may need to do > this when > the program you are debugging is threaded or when one needs to ensure > that all program state is reinit

Re: [Python-Dev] Should execv() call _run_exitfuncs()? If not, should _run_exitfuncs() be private?

2009-01-31 Thread Nick Coghlan
Rocky Bernstein wrote: > As a hobby I've been writing a debugger. One of the > commands,"restart", works by calling an execv(). You may need to do > this when > the program you are debugging is threaded or when one needs to ensure > that all program state is reinitialized. > > Recently, I added re

Re: [Python-Dev] Should execv() call _run_exitfuncs()? If not, should _run_exitfuncs() be private?

2009-02-01 Thread rocky
Guido van Rossum writes: > Depending on the use for the exit function you might or might not want > it run at the occasion of exec*(). E.g. I imagine that in a typical > fork() + exec*() scenario, calling the exit functions in the child > process would be a mistake. > > So I don't think the