Source-Changes-HG archive

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

[src/trunk]: src/sys/kern In lwp_create, copy l_sigstk from the template. Pre...



details:   https://anonhg.NetBSD.org/src/rev/40300394dddb
branches:  trunk
changeset: 772032:40300394dddb
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Thu Dec 15 00:05:18 2011 +0000

description:
In lwp_create, copy l_sigstk from the template. Previously sigaltstack wasn't
inherited across fork (but SA_ONSTACK handlers was), causing the child
process to crash when the handler is invoked. ok martin@, christos@

diffstat:

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

diffs (26 lines):

diff -r 8b64500500ca -r 40300394dddb sys/kern/kern_lwp.c
--- a/sys/kern/kern_lwp.c       Wed Dec 14 21:22:24 2011 +0000
+++ b/sys/kern/kern_lwp.c       Thu Dec 15 00:05:18 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_lwp.c,v 1.164 2011/10/19 10:51:47 yamt Exp $      */
+/*     $NetBSD: kern_lwp.c,v 1.165 2011/12/15 00:05:18 jmcneill 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.164 2011/10/19 10:51:47 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.165 2011/12/15 00:05:18 jmcneill Exp $");
 
 #include "opt_ddb.h"
 #include "opt_lockdebug.h"
@@ -792,6 +792,7 @@
        } else
                l2->l_prflag = 0;
 
+       l2->l_sigstk = l1->l_sigstk;
        l2->l_sigmask = l1->l_sigmask;
        CIRCLEQ_INIT(&l2->l_sigpend.sp_info);
        sigemptyset(&l2->l_sigpend.sp_set);



Home | Main Index | Thread Index | Old Index