[issue16822] execv (et al.) should invoke atexit handlers before executing new code

2018-07-08 Thread Tal Einat
Tal Einat added the comment: Seems like a decision needs to be made: Add support for `atexec` handlers, close this issue, or something else? -- ___ Python tracker ___ ___

[issue16822] execv (et al.) should invoke atexit handlers before executing new code

2018-07-06 Thread Ned Batchelder
Ned Batchelder added the comment: Coverage.py is registering a handler to save data before the program ends. The execv call is not in the coverage.py code, it's in the program that coverage.py is running. -- ___ Python tracker

[issue16822] execv (et al.) should invoke atexit handlers before executing new code

2018-07-06 Thread Tal Einat
Tal Einat added the comment: > we could definitely have a separate "atexec" handler Couldn't coverage.py and similar apps can just invoke the atexit handlers before calling os.execv() or similar? If so, perhaps a mention of this in the docs would suffice? -- nosy: +taleinat __

[issue16822] execv (et al.) should invoke atexit handlers before executing new code

2018-07-03 Thread Eric Snow
Change by Eric Snow : -- nosy: +emilyemorehouse, eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue16822] execv (et al.) should invoke atexit handlers before executing new code

2013-01-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: I agree with Charles-François, this is a too risky change. However, we could definitely have a separate "atexec" handler, like the "atfork" handlers which are proposed in issue16500. -- ___ Python tracker

[issue16822] execv (et al.) should invoke atexit handlers before executing new code

2012-12-31 Thread Charles-François Natali
Charles-François Natali added the comment: The first reason for not calling atexit handlers upon exec() is that it wouldn't be async-safe anymore, and could result in deadlocks. Also, since atexit handlers are inherited upon fork(), running atexit handlers upon exec() could result in such handler

[issue16822] execv (et al.) should invoke atexit handlers before executing new code

2012-12-31 Thread Georg Brandl
Georg Brandl added the comment: FTR, with C's atexit(3), the handlers are not called either on exec(). -- nosy: +georg.brandl ___ Python tracker ___ _

[issue16822] execv (et al.) should invoke atexit handlers before executing new code

2012-12-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: That's a good question. Conceptually it makes sense, but I wonder if programs currently rely on os.execv not cleaning up anything: not only it doesn't call atexit handlers, but it also doesn't try to shutdown the interpreter. Which can be handy if you are usin

[issue16822] execv (et al.) should invoke atexit handlers before executing new code

2012-12-30 Thread Ned Batchelder
New submission from Ned Batchelder: If I register an atexit handler, and then call os.execv, the handler is not invoked before my process changes over to the new program. Shouldn't it be? My program is ending, so my atexit handlers should be invoked. This is based on this coverage.py bug: