Lines Matching refs:O_CLOEXEC
41 * Test #24: check if dup3(O_CLOEXEC) works.
42 * Test #25: check if dup3(O_CLOEXEC) returned a fd we asked for.
43 * Test #26: check if dup3(O_CLOEXEC) set close-on-exec flag for duped fd.
47 * Test #30: check if dup3(O_CLOEXEC) fails if oldfd == newfd.
49 * Test #32: check if dup3(O_CLOEXEC) to a fd > current maximum number of
310 /* Does dup3(O_CLOEXEC) ever work? */
311 if ((fd2 = dup3(fd1, fd1 + 1, O_CLOEXEC)) < 0)
312 err(1, "dup3(O_CLOEXEC)");
313 printf("ok %d - dup3(O_CLOEXEC) works\n", ++test);
319 "no ok %d - dup3(O_CLOEXEC) didn't give us the right fd\n",
322 printf("ok %d - dup3(O_CLOEXEC) returned a correct fd\n",
329 "not ok %d - dup3(O_CLOEXEC) didn't set close-on-exec\n",
332 printf("ok %d - dup3(O_CLOEXEC) set close-on-exec\n",
362 if (dup3(fd1, fd1, O_CLOEXEC) != -1)
364 "not ok %d - dup3(fd1, fd1, O_CLOEXEC) succeeded\n", test);
366 printf("ok %d - dup3(fd1, fd1, O_CLOEXEC) failed\n", test);
378 if ((fd2 = dup3(fd1, rlp.rlim_cur + 1, O_CLOEXEC)) >= 0)
379 printf("not ok %d - dup3(O_CLOEXEC) bypassed NOFILE limit\n",
382 printf("ok %d - dup3(O_CLOEXEC) didn't bypass NOFILE limit\n",