home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d2xx / d282 / rcs.lha / RCS / rcs.zoo / rcs / rsbx.lib / emptymorgue.c < prev    next >
C/C++ Source or Header  |  1989-11-04  |  1KB  |  58 lines

  1. /****** rsbx.lib/EmptyMorgue() ***********************************************
  2. *
  3. *   NAME
  4. *    EmptyMorgue -- Process child termination messages.
  5. *
  6. *   SYNOPSIS
  7. *    EmptyMorgue()
  8. *
  9. *    void EmptyMorgue( void );
  10. *
  11. *   FUNCTION
  12. *    This function processes any termination messages from child processes
  13. *        of this process.
  14. *
  15. *   INPUTS
  16. *
  17. *   RESULT
  18. *
  19. *   NOTES
  20. *
  21. *   SEE ALSO
  22. *    ChildStatus(), CreateFamily(), LaunchChildl(), LaunchChildv(),
  23. *    OrphanChild(), OrphanChildren(), WaitChild().
  24. *
  25. *   BUGS
  26. *    None Known.
  27. *
  28. ******************************************************************************
  29. *
  30. */
  31.  
  32. #include <rsbx/childtasking.h>
  33.  
  34. void EmptyMorgue( void )
  35.     {
  36.     struct DeathNotice *msg;
  37.     struct ChildNode *node;
  38.  
  39.     while (msg = (struct DeathNotice *)GetMsg(_Children->Morgue))
  40.         {
  41.         for (node = (struct ChildNode *)_Children->ChildList.mlh_Head;
  42.             node->node.mln_Succ;
  43.             node = (struct ChildNode *)node->node.mln_Succ)
  44.             {
  45.             if (&node->notice == msg)
  46.                 {
  47.                 msg->noticeptr = NULL;
  48.                 break;
  49.                 }
  50.             }
  51.  
  52.         if (!node->node.mln_Succ)
  53.             {
  54.             ReplyMsg((struct Message *)msg);
  55.             }
  56.         }
  57.     }
  58.