mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 00:02:28 +00:00
Make detached threads work better
This change adds a double linked list of threads, so that pthread_exit() will know when it should call exit() from an orphaned child. This change also improves ftrace and strace logging.
This commit is contained in:
parent
b74d8c1acd
commit
cee6871710
37 changed files with 638 additions and 314 deletions
|
@ -218,6 +218,8 @@ void testlib_runtestcases(testfn_t *start, testfn_t *end, testfn_t warmup) {
|
|||
}
|
||||
if (_weaken(SetUpOnce)) _weaken(SetUpOnce)();
|
||||
for (x = 0, fn = start; fn != end; ++fn) {
|
||||
STRACE("");
|
||||
STRACE("# setting up %t", fn);
|
||||
if (_weaken(testlib_enable_tmp_setup_teardown)) SetupTmpDir();
|
||||
if (_weaken(SetUp)) _weaken(SetUp)();
|
||||
errno = 0;
|
||||
|
@ -229,6 +231,7 @@ void testlib_runtestcases(testfn_t *start, testfn_t *end, testfn_t warmup) {
|
|||
STRACE("# running test %t", fn);
|
||||
(*fn)();
|
||||
STRACE("");
|
||||
STRACE("# tearing down %t", fn);
|
||||
if (!IsWindows()) sys_getpid();
|
||||
if (_weaken(TearDown)) _weaken(TearDown)();
|
||||
if (_weaken(testlib_enable_tmp_setup_teardown)) TearDownTmpDir();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue