signals.c
changeset 9 c3fecc82ade6
parent 0 af501b0c1716
child 77 49e0babccb23
--- a/signals.c
+++ b/signals.c
@@ -1,7 +1,6 @@
 /**
- *     $Id: signals.c,v 1.1.1.1 2008-04-28 17:32:53 mbroeker Exp $
- * $Source: /development/c/demos/signals.c,v $
- *
+ * test/demos/signals.c
+ * Copyright (C) 2008 Markus Broeker
  */
 
 #ifndef _XOPEN_SOURCE
@@ -22,13 +21,10 @@
 {
     printf ("I received the SIGQUIT Signal\n");
     /*
-     * This kills the process and subprocesses
+     *  0 kills every process in the current process group
+     * -1 kills all reachable user processes (dangerous, logout)
      */
-    kill (-1, SIGKILL);
-    /*
-     * ^^ can not be reached
-     */
-    exit (0);
+    kill (0, SIGKILL);
 }
 
 int main (int argc, char **argv)