From: Etienne Buira Date: Sat, 18 Oct 2014 12:31:15 +0000 (+0200) Subject: Handle atexit list internaly for unthreaded builds X-Git-Tag: v2.2.0-rc0~19^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/0f4b6db3baeff8de53769b38f439408abd5a42f7?ds=inline;hp=0f4b6db3baeff8de53769b38f439408abd5a42f7 Handle atexit list internaly for unthreaded builds Wrap atexit()s calls on unthreaded builds to handle callback list internally. 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 async's parent process). That led to remove temporary files too early. Also remove a by-atexit-callback guard against this kind of issue in clone.c, as this patch makes it redundant. Fixes test 5537 (temporary shallow file vanished before unpack-objects could open it) BTW remove an unused variable in shallow.c. Helped-by: Duy Nguyen Helped-by: Andreas Schwab Helped-by: Junio C Hamano Signed-off-by: Etienne Buira Signed-off-by: Junio C Hamano ---