/*
 * fork: child reads visible in profile
 */

#include <fcntl.h>
#include <unistd.h>
#include <sys/wait.h>

int main(void)
{
	pid_t p = fork();
	if (p == 0) {
		int fd = open("/etc/hosts", O_RDONLY);
		if (fd >= 0) close(fd);
		_exit(0);
	}
	if (p > 0) {
		int s;
		waitpid(p, &s, 0);
	}
	return 0;
}
