Testing a request for BOS descriptor. Device enumeration needs to be quite different...
[AROS.git] / test / clib / execl2_vfork.c
blob351fb70d2cd1f70eb00b78f17aef9d90e0db604d
1 #include <proto/dos.h>
3 #include <stdio.h>
4 #include <stdlib.h>
5 #include <unistd.h>
6 #include <fcntl.h>
8 #include "test.h"
10 int main(void)
12 int fd;
13 FILE *f;
15 fd = open("execl2_out", O_RDWR|O_CREAT, 00700);
16 TEST(fd != -1);
18 f = fdopen(fd, "w");
19 TEST(f != NULL);
21 fputs("OK\n", f);
22 fflush(f);
24 if (vfork() == 0)
26 char arg[10];
27 sprintf(arg, "%d", fd);
28 execl("execl2_slave", "execl2_slave", arg, NULL);
29 TEST(0); /* Should not be reached */
30 exit(20);
33 Delay(50);
35 return 0;
38 void cleanup(void)
40 /* NOP */
41 return;