diff options
author | 2015-10-25 18:03:17 +0000 | |
---|---|---|
committer | 2015-10-25 18:03:17 +0000 | |
commit | 0b0bfcdbef423a0cd2e0c64ebef5ff892124e7cf (patch) | |
tree | ba3ec4f334a8e73984a8651ff6cfc3507d0396df /lib/libc/stdlib/atexit.c | |
parent | Hide __atexit and __atexit_register_cleanup() (diff) | |
download | wireguard-openbsd-0b0bfcdbef423a0cd2e0c64ebef5ff892124e7cf.tar.xz wireguard-openbsd-0b0bfcdbef423a0cd2e0c64ebef5ff892124e7cf.zip |
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@
Diffstat (limited to 'lib/libc/stdlib/atexit.c')
-rw-r--r-- | lib/libc/stdlib/atexit.c | 6 |
1 files changed, 5 insertions, 1 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 |