[haiku-commits] r33599 - haiku/trunk/src/system/kernel

  • From: axeld@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 15 Oct 2009 13:53:19 +0200 (CEST)

Author: axeld
Date: 2009-10-15 13:53:19 +0200 (Thu, 15 Oct 2009)
New Revision: 33599
Changeset: http://dev.haiku-os.org/changeset/33599/haiku

Modified:
   haiku/trunk/src/system/kernel/signal.cpp
Log:
* Moved SIGABRT to the signals that kill the process. Not sure if it's a good
  idea to always send SIGKILL to the main thread, though. I'm not really getting
  more insight by reading the POSIX specs.
* Anyway, in the mean time, this fixes bug #4784.


Modified: haiku/trunk/src/system/kernel/signal.cpp
===================================================================
--- haiku/trunk/src/system/kernel/signal.cpp    2009-10-15 11:35:31 UTC (rev 
33598)
+++ haiku/trunk/src/system/kernel/signal.cpp    2009-10-15 11:53:19 UTC (rev 
33599)
@@ -1,12 +1,14 @@
 /*
- * Copyright 2002-2008, Axel Dörfler, axeld@xxxxxxxxxxxxxxxxx
+ * Copyright 2002-2009, Axel Dörfler, axeld@xxxxxxxxxxxxxxxxx
  * Copyright 2002, Angelo Mottola, a.mottola@xxxxxxxxxx
  *
  * Distributed under the terms of the MIT License.
  */
 
+
 /*! POSIX signals handling routines */
 
+
 #include <ksignal.h>
 
 #include <stddef.h>
@@ -391,6 +393,7 @@
                                case SIGFPE:
                                case SIGILL:
                                case SIGTRAP:
+                               case SIGABRT:
                                        // If this is the main thread, we just 
fall through and let
                                        // this signal kill the team. Otherwise 
we send a SIGKILL to
                                        // the main thread first, since the 
signal will kill this
@@ -398,7 +401,6 @@
                                        if (thread != thread->team->main_thread)
                                                
send_signal(thread->team->main_thread->id, SIGKILL);
                                case SIGQUIT:
-                               case SIGABRT:
                                case SIGPOLL:
                                case SIGPROF:
                                case SIGSYS:
@@ -488,7 +490,7 @@
        thread lock held.
 */
 static status_t
-deliver_signal(struct thread *thread, uint signal, uint32 flags, 
+deliver_signal(struct thread *thread, uint signal, uint32 flags,
        bool &reschedule)
 {
        if (flags & B_CHECK_PERMISSION) {


Other related posts:

  • » [haiku-commits] r33599 - haiku/trunk/src/system/kernel - axeld