Fixed compatibility of output.
[AROS.git] / test / clib / execl2_vfork.c
blob1b6bf88b0f6aee24f16efa890d583a1aaae35499
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <proto/dos.h>
8 #include <stdio.h>
9 #include <stdlib.h>
10 #include <unistd.h>
11 #include <fcntl.h>
13 #include "test.h"
15 int main(void)
17 int fd;
18 FILE *f;
20 fd = open("execl2_out", O_RDWR|O_CREAT, 00700);
21 TEST(fd != -1);
23 f = fdopen(fd, "w");
24 TEST(f != NULL);
26 fputs("OK\n", f);
27 fflush(f);
29 if (vfork() == 0)
31 char arg[10];
32 sprintf(arg, "%d", fd);
33 execl("execl2_slave", "execl2_slave", arg, NULL);
34 TEST(0); /* Should not be reached */
35 exit(20);
38 Delay(50);
40 return 0;
43 void cleanup(void)
45 /* NOP */
46 return;