provide overrides for scheduling flags, tdnestcnt and idnestcnt
[AROS.git] / test / exec / childwait.c
blobbb83cef7a7afcfdf381a2f1c1af11935c8d74b0b
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <proto/exec.h>
7 #include <dos/dosextens.h>
8 #include <proto/dos.h>
10 LONG entry()
12 Delay(50);
13 return 0;
16 int main()
18 struct Process *child;
20 struct TagItem tags[] =
22 { NP_Entry, (IPTR) entry },
23 { NP_Cli, (IPTR) TRUE },
24 { NP_Name, (IPTR) "test" },
25 { NP_NotifyOnDeath, (IPTR) TRUE },
26 { TAG_DONE, 0 }
29 child = CreateNewProc(tags);
31 if(child)
33 ULONG childid = GetETask((struct Task*) child)->et_UniqueID;
34 Printf("Waiting for child with id %d\n", childid);
35 ChildWait(childid);
36 Printf("Child exited, freeing child\n");
37 ChildFree(childid);
39 else
40 PrintFault(IoErr(), "Couldn't create child process");
41 return 0;