public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] htl: fix register-atfork ordering
@ 2020-06-07 1:00 Samuel Thibault
0 siblings, 0 replies; only message in thread
From: Samuel Thibault @ 2020-06-07 1:00 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=6c5ca98d096a5f61144555c76fdfd3c2ad561082
commit 6c5ca98d096a5f61144555c76fdfd3c2ad561082
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: Sun Jun 7 02:57:04 2020 +0200
htl: fix register-atfork ordering
* htl/register-atfork.c (__register_atfork): Add new hooks at the end of
the list instead of the beginning.
Diff:
---
htl/register-atfork.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/htl/register-atfork.c b/htl/register-atfork.c
index 256b1148ac..4581ac5bba 100644
--- a/htl/register-atfork.c
+++ b/htl/register-atfork.c
@@ -109,15 +109,15 @@ __register_atfork (void (*prepare) (void),
new->parent = parent;
new->child = child;
new->dso_handle = dso_handle;
- new->prev = NULL;
+ new->next = NULL;
__libc_lock_lock (atfork_lock);
- new->next = fork_handlers;
- if (fork_handlers != NULL)
- fork_handlers->prev = new;
- fork_handlers = new;
- if (fork_last_handler == NULL)
- fork_last_handler = new;
+ new->prev = fork_last_handler;
+ if (fork_last_handler != NULL)
+ fork_last_handler->next = new;
+ if (fork_handlers == NULL)
+ fork_handlers = new;
+ fork_last_handler = new;
__libc_lock_unlock (atfork_lock);
return 0;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-06-07 1:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-07 1:00 [glibc] htl: fix register-atfork ordering Samuel Thibault
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).