summaryrefslogtreecommitdiff
path: root/threadproc/beos/proc.c
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2022-01-25 20:16:03 +0000
committerYann Ylavic <ylavic@apache.org>2022-01-25 20:16:03 +0000
commita3d78aae6ed5859177f225775a78e0c57f9aaa34 (patch)
tree67e73d69ee1be870984b68c1fb9d19fc5e88a264 /threadproc/beos/proc.c
parentbd96cb9ad7724d0b55574466bcd09fb42ba6d3d7 (diff)
downloadapr-a3d78aae6ed5859177f225775a78e0c57f9aaa34.tar.gz
apr_thread: Follow up to r1897207: Provide apr_thread_current_after_fork().
thread_local variables are not (always?) reset on fork(), so APR (and the user) needs a way to set the current_thread to NULL. Use apr_thread_current_after_fork() in apr_proc_fork()'s child process. Merge r1897470 from trunk. Submitted by: ylavic Reviewed by: ylavic git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.8.x@1897471 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'threadproc/beos/proc.c')
-rw-r--r--threadproc/beos/proc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/threadproc/beos/proc.c b/threadproc/beos/proc.c
index e3698082f..cd6f9a250 100644
--- a/threadproc/beos/proc.c
+++ b/threadproc/beos/proc.c
@@ -170,6 +170,9 @@ APR_DECLARE(apr_status_t) apr_proc_fork(apr_proc_t *proc, apr_pool_t *pool)
}
}
+#if AP_HAS_THREAD_LOCAL
+ apr_thread_current_after_fork();
+#endif
proc->pid = pid;
proc->in = NULL;
proc->out = NULL;