We need a flag for WCONTINUED so that we can reset it... Fixes bash issue.
This commit is contained in:
parent
5befeffc11
commit
cbf2c4d885
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kern_exit.c,v 1.257 2016/04/25 16:35:47 christos Exp $ */
|
||||
/* $NetBSD: kern_exit.c,v 1.258 2016/04/27 21:15:40 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 1999, 2006, 2007, 2008 The NetBSD Foundation, Inc.
|
||||
|
@ -67,7 +67,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.257 2016/04/25 16:35:47 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.258 2016/04/27 21:15:40 christos Exp $");
|
||||
|
||||
#include "opt_ktrace.h"
|
||||
#include "opt_dtrace.h"
|
||||
|
@ -1011,8 +1011,10 @@ find_stopped_child(struct proc *parent, idtype_t idtype, id_t id, int options,
|
|||
}
|
||||
|
||||
if ((options & WCONTINUED) != 0 &&
|
||||
child->p_xsig == SIGCONT) {
|
||||
child->p_xsig == SIGCONT &&
|
||||
(child->p_sflag & PS_CONTINUED)) {
|
||||
if ((options & WNOWAIT) == 0) {
|
||||
child->p_sflag &= ~PS_CONTINUED;
|
||||
child->p_waited = 1;
|
||||
parent->p_nstopchild--;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kern_sig.c,v 1.325 2016/04/06 03:11:31 christos Exp $ */
|
||||
/* $NetBSD: kern_sig.c,v 1.326 2016/04/27 21:15:40 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
|
||||
|
@ -70,7 +70,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.325 2016/04/06 03:11:31 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.326 2016/04/27 21:15:40 christos Exp $");
|
||||
|
||||
#include "opt_ptrace.h"
|
||||
#include "opt_dtrace.h"
|
||||
|
@ -1382,6 +1382,7 @@ kpsignal2(struct proc *p, ksiginfo_t *ksi)
|
|||
*/
|
||||
if ((prop & SA_CONT) != 0) {
|
||||
p->p_xsig = SIGCONT;
|
||||
p->p_sflag |= PS_CONTINUED;
|
||||
child_psignal(p, 0);
|
||||
if (action == SIG_DFL) {
|
||||
KASSERT(signo != SIGKILL);
|
||||
|
@ -1750,6 +1751,8 @@ issignal(struct lwp *l)
|
|||
/* Take the signal. */
|
||||
(void)sigget(sp, NULL, signo, NULL);
|
||||
p->p_xsig = signo;
|
||||
if (p->p_sflag & PS_CONTINUED)
|
||||
p->p_sflag &= ~PS_CONTINUED;
|
||||
signo = 0;
|
||||
sigswitch(true, PS_NOCLDSTOP, p->p_xsig);
|
||||
} else if (prop & SA_IGNORE) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: proc.h,v 1.329 2016/04/04 23:07:06 christos Exp $ */
|
||||
/* $NetBSD: proc.h,v 1.330 2016/04/27 21:15:40 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
|
||||
|
@ -384,6 +384,7 @@ struct proc {
|
|||
#define PS_STOPEXIT 0x02000000 /* Will be stopped at process exit */
|
||||
#define PS_NOTIFYSTOP 0x10000000 /* Notify parent of successful STOP */
|
||||
#define PS_COREDUMP 0x20000000 /* Process core-dumped */
|
||||
#define PS_CONTINUED 0x40000000 /* Process is continued */
|
||||
#define PS_STOPPING 0x80000000 /* Transitioning SACTIVE -> SSTOP */
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue