Example #1
0
static void
test(void)
{
	int fd;

	/* XXX: Shut up output, we just want the error code. */
	fd = open("/dev/null", O_RDWR);
	test_pass(fd >= 0);
	dup2(fd, 1);
	dup2(fd, 2);

	test_subproc_fork();
}
Example #2
0
static void
test(void)
{
	int fd;

	test_plan(6);

	/* XXX: Shut up stderr, we don't want the error output. */
	fd = open("/dev/null", O_RDWR);
	if (fd < 0)
		test_bail("cannot open /dev/null");
	dup2(fd, 2);

	test_subproc_fork();
}