summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2015-10-25 18:03:18 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2015-10-25 18:03:18 +0000
commitc884082b7e6d94344857ed795f005f63699ff4d0 (patch)
tree4f53c6951dcad5151d7093e7644fa3ed0fd5c5ff
parentaa4c33b09d7880dec6a821bbce875f7b2a3b8a93 (diff)
Move the _atfork_list definition to atexit.c so that the fork syscall stub
doesn't get pulled into all static executables ok millert@ jca@
-rw-r--r--lib/libc/stdlib/atexit.c6
-rw-r--r--lib/libc/sys/w_fork.c5
2 files changed, 6 insertions, 5 deletions
diff --git a/lib/libc/stdlib/atexit.c b/lib/libc/stdlib/atexit.c
index 4ccf84562c9..a44de37c880 100644
--- a/lib/libc/stdlib/atexit.c
+++ b/lib/libc/stdlib/atexit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: atexit.c,v 1.22 2015/10/25 18:01:24 guenther Exp $ */
+/* $OpenBSD: atexit.c,v 1.23 2015/10/25 18:03:17 guenther Exp $ */
/*
* Copyright (c) 2002 Daniel Hartmeier
* All rights reserved.
@@ -41,6 +41,10 @@
struct atexit *__atexit;
static int restartloop;
+/* define and initialize the list */
+struct atfork_listhead _atfork_list = TAILQ_HEAD_INITIALIZER(_atfork_list);
+
+
/*
* Function pointers are stored in a linked list of pages. The list
* is initially empty, and pages are allocated on demand. The first
diff --git a/lib/libc/sys/w_fork.c b/lib/libc/sys/w_fork.c
index 1c6080e0cbd..89415491f82 100644
--- a/lib/libc/sys/w_fork.c
+++ b/lib/libc/sys/w_fork.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: w_fork.c,v 1.1 2015/04/07 01:27:07 guenther Exp $ */
+/* $OpenBSD: w_fork.c,v 1.2 2015/10/25 18:03:17 guenther Exp $ */
/*
* Copyright (c) 2008 Kurt Miller <kurt@openbsd.org>
@@ -34,9 +34,6 @@
#include "thread_private.h"
#include "atfork.h"
-/* define and initialize the list */
-struct atfork_listhead _atfork_list = TAILQ_HEAD_INITIALIZER(_atfork_list);
-
pid_t _thread_fork(void);
pid_t