diff --git a/sys/kern/kern_lwp.c b/sys/kern/kern_lwp.c index 73c4bff175de..c1aff223e967 100644 --- a/sys/kern/kern_lwp.c +++ b/sys/kern/kern_lwp.c @@ -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 -__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 @@ lwp_wait(struct lwp *l, lwpid_t lid, lwpid_t *departed, bool exiting) */ 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; }