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 / createfamily.c < prev    next >
C/C++ Source or Header  |  1989-11-04  |  1KB  |  57 lines

  1. /****** rsbx.lib/CreateFamily() **********************************************
  2. *
  3. *   NAME
  4. *    CreateFamily -- 
  5. *
  6. *   SYNOPSIS
  7. *    success = CreateFamily()
  8. *
  9. *    int CreateFamily( void );
  10. *
  11. *   FUNCTION
  12. *    This function initializes the structures used to keep track of child
  13. *        processes of this process.
  14. *
  15. *   INPUTS
  16. *
  17. *   RESULT
  18. *    success       - Zero if unable to allocate and initialize needed
  19. *                    structures.
  20. *
  21. *   NOTES
  22. *
  23. *   SEE ALSO
  24. *    ChildStatus(), EmptyMorgue(), LaunchChildl(), LaunchChildv(),
  25. *    OrphanChild(), OrphanChildren(), WaitChild().
  26. *
  27. *   BUGS
  28. *    None Known.
  29. *
  30. ******************************************************************************
  31. *
  32. */
  33.  
  34. #include <proto/exec.h>
  35. #include <rsbx/childtasking.h>
  36.  
  37. int CreateFamily( void )
  38.     {
  39.     if (!_Children)
  40.         {
  41.         if (!(_Children = AllocMem(sizeof(*_Children), 0)))
  42.             {
  43.             return NULL;
  44.             }
  45.         NewList((struct List *)&_Children->ChildList);
  46.         _Children->Orphan = OrphanChildren;
  47.         if (!(_Children->Morgue = CreatePort(0, 0)))
  48.             {
  49.             FreeMem(_Children, sizeof(*_Children));
  50.             return NULL;
  51.             }
  52.         }
  53.  
  54.  
  55.     return -1;
  56.     }
  57.