Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Preserve l_private across forks.



details:   https://anonhg.NetBSD.org/src/rev/dabfdce49a37
branches:  trunk
changeset: 763527:dabfdce49a37
user:      joerg <joerg%NetBSD.org@localhost>
date:      Wed Mar 23 13:57:40 2011 +0000

description:
Preserve l_private across forks.

diffstat:

 sys/kern/kern_fork.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r e3d2966cf4fe -r dabfdce49a37 sys/kern/kern_fork.c
--- a/sys/kern/kern_fork.c      Wed Mar 23 13:57:04 2011 +0000
+++ b/sys/kern/kern_fork.c      Wed Mar 23 13:57:40 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_fork.c,v 1.179 2011/01/18 23:56:49 matt Exp $     */
+/*     $NetBSD: kern_fork.c,v 1.180 2011/03/23 13:57:40 joerg Exp $    */
 
 /*-
  * Copyright (c) 1999, 2001, 2004, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_fork.c,v 1.179 2011/01/18 23:56:49 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_fork.c,v 1.180 2011/03/23 13:57:40 joerg Exp $");
 
 #include "opt_ktrace.h"
 
@@ -425,6 +425,7 @@
        lwp_create(l1, p2, uaddr, (flags & FORK_PPWAIT) ? LWP_VFORK : 0,
            stack, stacksize, (func != NULL) ? func : child_return, arg, &l2,
            l1->l_class);
+       lwp_setprivate(l2, l1->l_private);
 
        /*
         * If emulation has a process fork hook, call it now.



Home | Main Index | Thread Index | Old Index