Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/librump/rumpkern Reparent children of a dying lwpro...
details: https://anonhg.NetBSD.org/src/rev/3424d810b395
branches: trunk
changeset: 328753:3424d810b395
user: pooka <pooka%NetBSD.org@localhost>
date: Wed Apr 16 22:34:02 2014 +0000
description:
Reparent children of a dying lwproc. Fixes wpa_supplicant -B (and
most likely a bunch of other things).
diffstat:
sys/rump/librump/rumpkern/lwproc.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diffs (41 lines):
diff -r cdb3274b3f52 -r 3424d810b395 sys/rump/librump/rumpkern/lwproc.c
--- a/sys/rump/librump/rumpkern/lwproc.c Wed Apr 16 22:33:07 2014 +0000
+++ b/sys/rump/librump/rumpkern/lwproc.c Wed Apr 16 22:34:02 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lwproc.c,v 1.29 2014/04/09 23:53:36 pooka Exp $ */
+/* $NetBSD: lwproc.c,v 1.30 2014/04/16 22:34:02 pooka Exp $ */
/*
* Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved.
@@ -28,7 +28,7 @@
#define RUMP__CURLWP_PRIVATE
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.29 2014/04/09 23:53:36 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.30 2014/04/16 22:34:02 pooka Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -83,6 +83,7 @@
lwproc_proc_free(struct proc *p)
{
kauth_cred_t cred;
+ struct proc *child;
KASSERT(p->p_stat == SDYING || p->p_stat == SDEAD);
@@ -96,6 +97,14 @@
mutex_enter(proc_lock);
+ /* childranee eunt initus */
+ while ((child = LIST_FIRST(&p->p_children)) != NULL) {
+ LIST_REMOVE(child, p_sibling);
+ child->p_pptr = initproc;
+ child->p_ppid = 1;
+ LIST_INSERT_HEAD(&initproc->p_children, child, p_sibling);
+ }
+
KASSERT(p->p_nlwps == 0);
KASSERT(LIST_EMPTY(&p->p_lwps));
Home |
Main Index |
Thread Index |
Old Index