Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.3.48 /kernel/exit.c

Filename:/kernel/exit.c
Lines Added:8
Lines Deleted:3
Also changed in: (Previous) 2.3.43  2.3.42  2.3.41  2.3.27  2.3.25  2.3.23 
(Following) 2.3.51  2.3.52  2.3.99-pre1  2.3.99-pre4  2.3.99-pre6  2.3.99-pre7 

Location
[  2.3.48
  [  kernel
     o  exit.c

Patch

diff -u --recursive --new-file v2.3.47/linux/kernel/exit.c linux/kernel/exit.c
--- v2.3.47/linux/kernel/exit.c   Thu Feb 10 17:11:23 2000
+++ linux/kernel/exit.c   Mon Feb 21 10:59:36 2000
@@ -445,7 +445,7 @@
    DECLARE_WAITQUEUE(wait, current);
    struct task_struct *p;
 
-   if (options & ~(WNOHANG|WUNTRACED|__WCLONE))
+   if (options & ~(WNOHANG|WUNTRACED|__WCLONE|__WALL))
       return -EINVAL;
 
    add_wait_queue(¤t->wait_chldexit,&wait);
@@ -464,8 +464,13 @@
          if (p->pgrp != -pid)
             continue;
       }
-      /* wait for cloned processes iff the __WCLONE flag is set */
-      if ((p->exit_signal != SIGCHLD) ^ ((options & __WCLONE) != 0))
+      /* Wait for all children (clone and not) if __WALL is set;
+       * otherwise, wait for clone children *only* if __WCLONE is
+       * set; otherwise, wait for non-clone children *only*.  (Note:
+       * A "clone" child here is one that reports to its parent
+       * using a signal other than SIGCHLD.) */
+      if (((p->exit_signal != SIGCHLD) ^ ((options & __WCLONE) != 0))
+          && !(options & __WALL))
          continue;
       flag = 1;
       switch (p->state) {


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.