6 #include "posix-compat.h"
10 #define ACTUAL ((void *) 0x10000000)
20 printf ("(mmap-exit) begin\n");
22 /* Make child write file. */
23 printf ("(mmap-exit) run child\n");
24 child = exec ("child-mm-wrt");
27 printf ("(mmap-exit) exec() failed\n");
33 printf ("(mmap-exit) join() returned bad exit code: %d\n", code);
36 printf ("(mmap-exit) child finished\n");
38 /* Read back via read(). */
39 fd = open ("sample.txt");
42 printf ("(mmap-exit) open() failed\n");
46 read (fd, buf, strlen (sample));
47 if (memcmp (buf, sample, strlen (sample)))
49 printf ("(mmap-exit) read of mmap-written file reported bad data\n");
55 printf ("(mmap-exit) end\n");