home *** CD-ROM | disk | FTP | other *** search
- /****** rsbx.lib/CreateFamily() **********************************************
- *
- * NAME
- * CreateFamily --
- *
- * SYNOPSIS
- * success = CreateFamily()
- *
- * int CreateFamily( void );
- *
- * FUNCTION
- * This function initializes the structures used to keep track of child
- * processes of this process.
- *
- * INPUTS
- *
- * RESULT
- * success - Zero if unable to allocate and initialize needed
- * structures.
- *
- * NOTES
- *
- * SEE ALSO
- * ChildStatus(), EmptyMorgue(), LaunchChildl(), LaunchChildv(),
- * OrphanChild(), OrphanChildren(), WaitChild().
- *
- * BUGS
- * None Known.
- *
- ******************************************************************************
- *
- */
-
- #include <proto/exec.h>
- #include <rsbx/childtasking.h>
-
- int CreateFamily( void )
- {
- if (!_Children)
- {
- if (!(_Children = AllocMem(sizeof(*_Children), 0)))
- {
- return NULL;
- }
- NewList((struct List *)&_Children->ChildList);
- _Children->Orphan = OrphanChildren;
- if (!(_Children->Morgue = CreatePort(0, 0)))
- {
- FreeMem(_Children, sizeof(*_Children));
- return NULL;
- }
- }
-
-
- return -1;
- }
-