O_CLOFORK
switch (flags & (O_CLOEXEC|O_CLOFORK)) {
case O_CLOEXEC|O_CLOFORK:
case O_CLOFORK:
#ifndef O_CLOFORK
O_CLOEXEC | O_CLOFORK)) != 0) {
int oflags = (O_RDONLY | O_BINARY | O_CLOEXEC | O_CLOFORK
| O_BINARY | O_CLOEXEC | O_CLOFORK | O_DIRECTORY));
#ifndef O_CLOFORK
fd_set_foclose(curlwp, fd, (flag & O_CLOFORK) != 0);
if (flags & ~(O_CLOEXEC|O_CLOFORK|O_NONBLOCK|O_NOSIGPIPE))
fd_set_foclose(curlwp, newfd, (flags & O_CLOFORK) != 0);
if (flags & ~(O_CLOEXEC|O_CLOFORK|O_NONBLOCK|O_NOSIGPIPE))
fd_set_foclose(l, fildes[0], (flags & O_CLOFORK) != 0);
fd_set_foclose(l, fildes[1], (flags & O_CLOFORK) != 0);
fd_set_foclose(l, *fd, (flags & O_CLOFORK) != 0);
O_CLOFORK : 0));
if (flags & ~(O_CLOEXEC|O_CLOFORK|O_NONBLOCK|O_NOSIGPIPE))
if (flags & O_CLOFORK)
fd_set_foclose(l, fd, (flags & O_CLOFORK) != 0);
if (flags & O_CLOFORK)
O_DIRECTORY|O_CLOEXEC|O_CLOFORK|O_NOSIGPIPE|\
RL(fd3 = dup3(STDIN_FILENO, 3, O_CLOFORK));
RL(fd = kqueue1(O_CLOFORK));
RL(fd = open("file", O_RDWR|O_CREAT|O_CLOFORK, 0644));
RL(pipe2(fd, O_CLOFORK));
RL(pipe2(fd, O_CLOFORK));
#if defined(O_CLOFORK) && O_CLOFORK != 0
RL(fd = open("/dev/drvctl", O_RDONLY|O_CLOFORK));
#if defined(O_CLOFORK) && O_CLOFORK != 0
run(O_CLOFORK);
#ifndef O_CLOFORK
if (flags & O_CLOFORK) {
if ((fdm = posix_openpt(O_RDWR|O_NONBLOCK|O_CLOEXEC|O_CLOFORK)) == -1) {