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
/
orphanchildren.c
< prev
next >
Wrap
C/C++ Source or Header
|
1989-11-04
|
1KB
|
58 lines
/****** rsbx.lib/OrphanChildren() ********************************************
*
* NAME
* OrphanChildren -- Orphan all child processes of this process.
*
* SYNOPSIS
* OrphanChildren()
*
* void OrphanChildren( void );
*
* FUNCTION
* This function orphans all child processes of this process and frees
* the memory used to keep track of the children.
*
* INPUTS
*
* RESULT
*
* NOTES
*
* SEE ALSO
* ChildStatus(), CreateFamily(), EmptyMorgue(), LaunchChildl(),
* LaunchChildv(), OrphanChild(), WaitChild().
*
* BUGS
* None Known.
*
******************************************************************************
*
*/
#include <rsbx/childtasking.h>
void OrphanChildren( void )
{
struct ChildNode *node;
Forbid();
EmptyMorgue();
DeletePort(_Children->Morgue);
while ((node = (struct ChildNode *)_Children->ChildList.mlh_Head) &&
node->node.mln_Succ)
{
if (node->notice.noticeptr)
{
*node->notice.noticeptr = NULL;
}
Remove((struct Node *)node);
FreeMem(node, sizeof(struct ChildNode));
}
FreeMem(_Children, sizeof(*_Children));
_Children = NULL;
Permit();
}