Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Also wait interruptibly when exiting. Avoids deadlo...
details: https://anonhg.NetBSD.org/src/rev/e0ca6dc08903
branches: trunk
changeset: 357913:e0ca6dc08903
user: christos <christos%NetBSD.org@localhost>
date: Sat Dec 02 22:51:22 2017 +0000
description:
Also wait interruptibly when exiting. Avoids deadlocked on exit processes
create by golang.
diffstat:
sys/kern/kern_lwp.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (30 lines):
diff -r f6122d15aa18 -r e0ca6dc08903 sys/kern/kern_lwp.c
--- a/sys/kern/kern_lwp.c Sat Dec 02 21:04:59 2017 +0000
+++ b/sys/kern/kern_lwp.c Sat Dec 02 22:51:22 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_lwp.c,v 1.190 2017/06/22 09:05:09 skrll Exp $ */
+/* $NetBSD: kern_lwp.c,v 1.191 2017/12/02 22:51:22 christos Exp $ */
/*-
* Copyright (c) 2001, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -211,7 +211,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.190 2017/06/22 09:05:09 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.191 2017/12/02 22:51:22 christos Exp $");
#include "opt_ddb.h"
#include "opt_lockdebug.h"
@@ -645,8 +645,9 @@
*/
if (exiting) {
KASSERT(p->p_nlwps > 1);
- cv_wait(&p->p_lwpcv, p->p_lock);
- error = EAGAIN;
+ error = cv_wait_sig(&p->p_lwpcv, p->p_lock);
+ if (error == 0)
+ error = EAGAIN;
break;
}
Home |
Main Index |
Thread Index |
Old Index