Searched refs:nullfd (Results 1 – 7 of 7) sorted by relevance
| /freebsd-13.1/lib/libc/gen/ |
| H A D | daemon.c | 48 daemonfd(int chdirfd, int nullfd) in daemonfd() argument 87 if (nullfd != -1) { in daemonfd() 88 (void)_dup2(nullfd, STDIN_FILENO); in daemonfd() 89 (void)_dup2(nullfd, STDOUT_FILENO); in daemonfd() 90 (void)_dup2(nullfd, STDERR_FILENO); in daemonfd() 98 int chdirfd, nullfd, ret; in daemon() local 101 nullfd = _open(_PATH_DEVNULL, O_RDWR, 0); in daemon() 103 nullfd = -1; in daemon() 110 ret = daemonfd(chdirfd, nullfd); in daemon() 115 if (nullfd > 2) in daemon() [all …]
|
| /freebsd-13.1/lib/libcasper/libcasper/ |
| H A D | libcasper_impl.c | 53 int nullfd, nfd; in fd_fix_environment() local 58 nullfd = open(_PATH_DEVNULL, O_RDWR); in fd_fix_environment() 59 if (nullfd == -1) in fd_fix_environment() 66 if (dup2(nullfd, *fdp) == -1) in fd_fix_environment() 71 close(nullfd); in fd_fix_environment()
|
| /freebsd-13.1/usr.sbin/autofs/ |
| H A D | popen.c | 82 int error, i, nullfd, outfds[2]; in auto_popen() local 85 nullfd = open(_PATH_DEVNULL, O_RDWR, 0); in auto_popen() 86 if (nullfd < 0) in auto_popen() 120 dup2(nullfd, STDIN_FILENO); in auto_popen() 123 close(nullfd); in auto_popen() 138 close(nullfd); in auto_popen()
|
| /freebsd-13.1/usr.bin/mail/ |
| H A D | collect.c | 340 int nullfd, tempfd, rc; in collect() local 343 if ((nullfd = open(_PATH_DEVNULL, O_RDONLY, 0)) in collect() 361 rc = run_command(sh, 0, nullfd, fileno(fbuf), in collect() 364 close(nullfd); in collect()
|
| /freebsd-13.1/contrib/llvm-project/compiler-rt/lib/fuzzer/ |
| H A D | FuzzerUtilFuchsia.cpp | 543 int nullfd = fdio_bind_to_fd(fdio_null, -1, 0); in DiscardOutput() local 544 if (nullfd < 0) return; in DiscardOutput() 545 dup2(nullfd, Fd); in DiscardOutput()
|
| /freebsd-13.1/sbin/dhclient/ |
| H A D | dhclient.c | 103 static int nullfd = -1; variable 478 if ((nullfd = open(_PATH_DEVNULL, O_RDWR, 0)) == -1) in main() 2474 if (daemonfd(-1, nullfd) == -1) in go_daemon() 2486 if (nullfd != -1) { in go_daemon() 2487 close(nullfd); in go_daemon() 2488 nullfd = -1; in go_daemon() 2838 dup2(nullfd, STDIN_FILENO); in fork_privchld() 2839 dup2(nullfd, STDOUT_FILENO); in fork_privchld() 2840 dup2(nullfd, STDERR_FILENO); in fork_privchld() 2841 close(nullfd); in fork_privchld()
|
| /freebsd-13.1/crypto/openssh/ |
| H A D | misc.c | 1438 int nullfd, dupfd; in sanitise_stdfd() local 1440 if ((nullfd = dupfd = open(_PATH_DEVNULL, O_RDWR)) == -1) { in sanitise_stdfd() 1448 if (dup2(nullfd, dupfd) == -1) { in sanitise_stdfd() 1454 if (nullfd > STDERR_FILENO) in sanitise_stdfd() 1455 close(nullfd); in sanitise_stdfd()
|