Source-Changes-HG archive

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

[src/nathanw_sa]: src/sys/kern When killing a stopped process with SIGKILL, u...



details:   https://anonhg.NetBSD.org/src/rev/0cb7540fc4e5
branches:  nathanw_sa
changeset: 504868:0cb7540fc4e5
user:      nathanw <nathanw%NetBSD.org@localhost>
date:      Thu Jul 19 16:53:09 2001 +0000

description:
When killing a stopped process with SIGKILL, use proc_unstop() to get
LWPs running sufficently to notice the signal.

diffstat:

 sys/kern/kern_sig.c |  16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diffs (38 lines):

diff -r 9f603ebe1ee3 -r 0cb7540fc4e5 sys/kern/kern_sig.c
--- a/sys/kern/kern_sig.c       Thu Jul 19 15:32:15 2001 +0000
+++ b/sys/kern/kern_sig.c       Thu Jul 19 16:53:09 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_sig.c,v 1.112.2.3 2001/07/09 22:29:47 nathanw Exp $       */
+/*     $NetBSD: kern_sig.c,v 1.112.2.4 2001/07/19 16:53:09 nathanw Exp $       */
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1991, 1993
@@ -904,10 +904,16 @@
                                goto out;
 
                        /*
-                        * Kill signal always sets processes running.
+                        * Kill signal always sets processes running,
+                        * if possible.
                         */
-                       if (signum == SIGKILL)
-                               goto runfast;
+                       if (signum == SIGKILL) {
+                               l = proc_unstop(p);
+                               if (l)
+                                       goto runfast;
+                               /* XXX should this be possible? */
+                               goto out;
+                       }
                        
                        if (prop & SA_CONT) {
                                /*
@@ -1212,7 +1218,7 @@
                         * left to discover the STOP signal on their
                         * way back to userspace, but that's harder 
                         * with multiple LWPs. 
-                        * XXX This shou;d be okay, but.....
+                        * XXX This should be okay, but.....
                         */
                        l->l_stat = LSSTOP;
                } else if ((l->l_stat == LSSUSPENDED) || 



Home | Main Index | Thread Index | Old Index