summaryrefslogtreecommitdiff
path: root/lib/libc_r/uthread/uthread_fork.c
diff options
context:
space:
mode:
authorDavid Leonard <d@cvs.openbsd.org>1998-11-09 03:13:22 +0000
committerDavid Leonard <d@cvs.openbsd.org>1998-11-09 03:13:22 +0000
commitff47464de5e68e9c49fe312c953f54b2e90f546c (patch)
tree4ec0e7f13d619e1b5bf6abfd7125a4ec17569568 /lib/libc_r/uthread/uthread_fork.c
parent1b2b2c2386c6cc5ebffc769b8a39b80d47e4e0d0 (diff)
sync with FreeBSD (rwlock, gc thread, man pages)
add (broken) mips md stuff fix some const warnings add sigaltstack() stub another hash at getting shlib auto-init to work (mips/elf and i386/a.out)
Diffstat (limited to 'lib/libc_r/uthread/uthread_fork.c')
-rw-r--r--lib/libc_r/uthread/uthread_fork.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc_r/uthread/uthread_fork.c b/lib/libc_r/uthread/uthread_fork.c
index b62990a1a50..c9b5cee5f90 100644
--- a/lib/libc_r/uthread/uthread_fork.c
+++ b/lib/libc_r/uthread/uthread_fork.c
@@ -33,8 +33,8 @@
#include <errno.h>
#include <string.h>
#include <unistd.h>
-#include <stdlib.h>
#include <fcntl.h>
+#include <stdlib.h>
#ifdef _THREAD_SAFE
#include <pthread.h>
#include "pthread_private.h"
@@ -43,7 +43,6 @@ pid_t
fork(void)
{
int flags;
- int status;
pid_t ret;
pthread_t pthread;
pthread_t pthread_next;
@@ -105,15 +104,16 @@ fork(void)
pthread->nxt = NULL;
} else {
if (pthread->attr.stackaddr_attr ==
- NULL && pthread->stack != NULL) {
+ NULL && pthread->stack != NULL)
/*
* Free the stack of the
* dead thread:
*/
free(pthread->stack);
- }
+
if (pthread->specific_data != NULL)
free(pthread->specific_data);
+
free(pthread);
}