示例#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();
}
示例#2
0
文件: t-subproc.c 项目: mwhudson/dpkg
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();
}