Source-Changes-HG archive

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

[src/nathanw_sa]: src/sys/kern Prevent calling coredump() from multiple LWPs ...



details:   https://anonhg.NetBSD.org/src/rev/ede9e3f58e2c
branches:  nathanw_sa
changeset: 504826:ede9e3f58e2c
user:      nathanw <nathanw%NetBSD.org@localhost>
date:      Mon Jul 09 22:29:47 2001 +0000

description:
Prevent calling coredump() from multiple LWPs in a process; once is enough.

diffstat:

 sys/kern/kern_sig.c |  10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diffs (24 lines):

diff -r 2f1df3344831 -r ede9e3f58e2c sys/kern/kern_sig.c
--- a/sys/kern/kern_sig.c       Sun Jul 08 23:57:10 2001 +0000
+++ b/sys/kern/kern_sig.c       Mon Jul 09 22:29:47 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_sig.c,v 1.112.2.2 2001/06/21 20:06:53 nathanw Exp $       */
+/*     $NetBSD: kern_sig.c,v 1.112.2.3 2001/07/09 22:29:47 nathanw Exp $       */
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1991, 1993
@@ -1390,6 +1390,14 @@
        int             error, exitsig;
 
        p = l->l_proc;
+
+       /* Don't call coredump() or exit1() multiple times 
+        * in the same process.
+        */
+       if (p->p_flag & P_WEXIT)
+               lwp_exit(l);
+       p->p_flag |= P_WEXIT;
+
        exitsig = signum;
        p->p_acflag |= AXSIG;
        if (sigprop[signum] & SA_CORE) {



Home | Main Index | Thread Index | Old Index