Re: [PATCH v2] Handle atexit list internaly for unthreaded builds

2014-10-13 Thread Etienne Buira
On Mon, Oct 13, 2014 at 2:56 AM, Duy Nguyen pclo...@gmail.com wrote: On Sun, Oct 12, 2014 at 4:09 PM, Etienne Buira etienne.bu...@gmail.com wrote: Replace atexit()s calls with cmd_atexit that is atexit() on threaded builds, but handles the callbacks list internally for unthreaded builds.

[PATCH v2] Handle atexit list internaly fo unthreaded builds

2014-10-12 Thread Etienne Buira
Replace atexit()s calls with cmd_atexit that is atexit() on threaded builds, but handles the callbacks list internally for unthreaded builds. This is needed because on unthreaded builds, asyncs inherits parent's atexit() list, that gets run as soon as the async exit()s (and again at the end of

Re: [PATCH v2] Handle atexit list internaly fo unthreaded builds

2014-10-12 Thread Duy Nguyen
On Sun, Oct 12, 2014 at 4:09 PM, Etienne Buira etienne.bu...@gmail.com wrote: Replace atexit()s calls with cmd_atexit that is atexit() on threaded builds, but handles the callbacks list internally for unthreaded builds. Maybe hide this in git-compat-util.h and #define atexit(x) cmd_atexit(x)?