1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00

* stdlib/test-canon.c (do_test): Close fd before unlinking file so

that directory is empty even on non-POSIX filesystems.
This commit is contained in:
Ulrich Drepper
2006-08-01 06:40:11 +00:00
parent 13669f2c30
commit a1260d92a7
5 changed files with 134 additions and 6 deletions

View File

@ -742,9 +742,7 @@ __reclaim_stacks (void)
list_t *runp;
list_for_each (runp, &stack_used)
{
struct pthread *curp;
curp = list_entry (runp, struct pthread, list);
struct pthread *curp = list_entry (runp, struct pthread, list);
if (curp != self)
{
/* This marks the stack as free. */
@ -758,6 +756,13 @@ __reclaim_stacks (void)
}
}
/* Reset the PIDs in any cached stacks. */
list_for_each (runp, &stack_cache)
{
struct pthread *curp = list_entry (runp, struct pthread, list);
curp->pid = self->pid;
}
/* Add the stack of all running threads to the cache. */
list_splice (&stack_used, &stack_cache);