_PATH_DEVNULL
coref = _PATH_DEVNULL;
memf = _PATH_DEVNULL;
if (open(_PATH_DEVNULL, O_RDONLY) != 0)
_PATH_DEVNULL, strerror(errno));
if (open(_PATH_DEVNULL, O_RDONLY) != 0)
_PATH_DEVNULL, strerror(errno));
#ifndef _PATH_DEVNULL
if (!noclose && (fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) {
#ifndef _PATH_DEVNULL
in_fd[0] = open(_PATH_DEVNULL, O_RDONLY);
out_fd[1] = open(_PATH_DEVNULL, O_WRONLY);
err_fd[1] = open(_PATH_DEVNULL, O_WRONLY);
#ifndef _PATH_DEVNULL
int devnull = open(_PATH_DEVNULL, O_RDWR, 0);
SSH_X11_PROTO, _PATH_DEVNULL);
_PATH_DEVNULL);
"%s %s%s list %s 2>" _PATH_DEVNULL,
#ifndef _PATH_DEVNULL
if ((nullfd = dupfd = open(_PATH_DEVNULL, O_RDWR)) == -1) {
if ((devnull = open(_PATH_DEVNULL, O_RDWR)) == -1) {
error_f("open %s: %s", _PATH_DEVNULL,
if ((devnull = open(_PATH_DEVNULL, O_RDWR)) == -1) {
error("%s: open %s: %s", tag, _PATH_DEVNULL,
if ((fd0 = open(_PATH_DEVNULL, O_RDONLY)) == -1)
if (!noclose && (fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) {
if ((fd = open(_PATH_DEVNULL, O_RDWR)) < 2)
in = open(_PATH_DEVNULL, O_RDONLY);
if ((devnull = open(_PATH_DEVNULL, O_RDWR)) == -1)
fatal("open %s: %s", _PATH_DEVNULL, strerror(errno));
fatal("dup %s: %s", _PATH_DEVNULL, strerror(errno));
if ((devnull = open(_PATH_DEVNULL, O_RDWR)) == -1)
fatal("open %s: %s", _PATH_DEVNULL, strerror(errno));
fatal("dup %s: %s", _PATH_DEVNULL, strerror(errno));
nullfd = _open(_PATH_DEVNULL, O_RDWR, 0);
runtest(_PATH_DEVNULL, O_RDWR, "w", true);
runtest(_PATH_DEVNULL, O_RDONLY, "a", false);
runtest(_PATH_DEVNULL, O_WRONLY, "a", true);
runtest(_PATH_DEVNULL, O_RDWR, "a", true);
runtest(_PATH_DEVNULL, O_RDONLY, "r+", false);
runtest(_PATH_DEVNULL, O_WRONLY, "r+", false);
runtest(_PATH_DEVNULL, O_RDWR, "r+", true);
runtest(_PATH_DEVNULL, O_RDONLY, "w+", false);
runtest(_PATH_DEVNULL, O_WRONLY, "w+", false);
runtest(_PATH_DEVNULL, O_RDWR, "w+", true);
runtest(_PATH_DEVNULL, O_RDONLY, "r", true);
runtest(_PATH_DEVNULL, O_WRONLY, "r", false);
runtest(_PATH_DEVNULL, O_RDWR, "r", true);
runtest(_PATH_DEVNULL, O_RDONLY, "w", false);
runtest(_PATH_DEVNULL, O_WRONLY, "w", true);
runtest(_PATH_DEVNULL, "a");
runtest(_PATH_DEVNULL, "a+");
runtest(_PATH_DEVNULL, "re");
runtest(_PATH_DEVNULL, "r+e");
runtest(_PATH_DEVNULL, "we");
runtest(_PATH_DEVNULL, "w+e");
runtest(_PATH_DEVNULL, "ae");
runtest(_PATH_DEVNULL, "a+e");
runtest(_PATH_DEVNULL, "re+");
runtest(_PATH_DEVNULL, "we+");
runtest(_PATH_DEVNULL, "ae+");
runtest(_PATH_DEVNULL, "r");
runtest(_PATH_DEVNULL, "r+");
runtest(_PATH_DEVNULL, "w");
runtest(_PATH_DEVNULL, "w+");
runtest(_PATH_DEVNULL, "r", NULL, "a", false);
runtest(_PATH_DEVNULL, "w", NULL, "a", true);
runtest(_PATH_DEVNULL, "r+", NULL, "a", true);
runtest(_PATH_DEVNULL, "r", NULL, "r+", false);
runtest(_PATH_DEVNULL, "w", NULL, "r+", false);
runtest(_PATH_DEVNULL, "r+", NULL, "r+", true);
runtest(_PATH_DEVNULL, "r", NULL, "w+", false);
runtest(_PATH_DEVNULL, "w", NULL, "w+", false);
runtest(_PATH_DEVNULL, "r+", NULL, "w+", true);
runtest("/bin/sh", "r", _PATH_DEVNULL, "r", true);
runtest("/bin/sh", "r", _PATH_DEVNULL, "w", true);
runtest(_PATH_DEVNULL, "r", NULL, "r", true);
runtest(_PATH_DEVNULL, "w", NULL, "r", false);
runtest(_PATH_DEVNULL, "r+", NULL, "r", true);
runtest(_PATH_DEVNULL, "r", NULL, "w", false);
runtest(_PATH_DEVNULL, "w", NULL, "w", true);
runtest(_PATH_DEVNULL, "r+", NULL, "w", true);
client_sock = open(_PATH_DEVNULL, O_WRONLY);
nullfd = open(_PATH_DEVNULL, O_RDWR);
errx(1, "Unable to open %s", _PATH_DEVNULL);
fd = open(_PATH_DEVNULL, O_RDWR);
errx(1, "Unable to open %s", _PATH_DEVNULL);
if (strcmp(mf, _PATH_DEVNULL) == 0) {
kd->vmfd = open(_PATH_DEVNULL, O_RDONLY | O_CLOEXEC);
fd = open(_PATH_DEVNULL, O_RDONLY);
open(_PATH_DEVNULL, O_RDONLY);
if ((nullfd = open(_PATH_DEVNULL, O_RDWR, 0)) == -1)
error("cannot open %s: %m", _PATH_DEVNULL);
(void)strlcpy(dumpdev, _PATH_DEVNULL, sizeof(dumpdev));
dev = _PATH_DEVNULL;
if (strcmp(dev, _PATH_DEVNULL) == 0) {
fd = open(_PATH_DEVNULL, O_RDONLY);
_PATH_DEVNULL);
fd = open(_PATH_DEVNULL, O_WRONLY);
_PATH_DEVNULL);
open(_PATH_DEVNULL, O_RDONLY);
if ((fd = open(_PATH_DEVNULL, O_RDWR)) == -1) {
nfd = open(_PATH_DEVNULL, O_RDWR);
err(1, "open: %s", _PATH_DEVNULL);
terminal = fopen(_PATH_DEVNULL, "r");
_PATH_DEVNULL, strerror(errno));
s = open(_PATH_DEVNULL, O_WRONLY, 0);
fd = open(_PATH_DEVNULL, O_RDWR);
nfd = open(_PATH_DEVNULL, O_RDWR);
err(1, "%s: open %s", __func__, _PATH_DEVNULL);
fd = open(_PATH_DEVNULL, O_RDONLY);
ATF_REQUIRE_MSG(fd != -1, "open(\" "_PATH_DEVNULL" \"): %s",
f1 = fopen(_PATH_DEVNULL, "r");
f2 = fopen(_PATH_DEVNULL, "r");
if ((nullfd = open(_PATH_DEVNULL, O_RDONLY, 0))
warn(_PATH_DEVNULL);
out_creating = strcmp(source_file, _PATH_DEVNULL) == 0;
source_file = xstrdup(_PATH_DEVNULL);
if (strnEQ(at, _PATH_DEVNULL, sizeof(_PATH_DEVNULL) - 1)) {
kd = kvm_openfiles(_PATH_DEVNULL, _PATH_DEVNULL, _PATH_DEVNULL,
kd = kvm_open(NULL, _PATH_DEVNULL, NULL, O_RDONLY, "kvm_open");
kd = kvm_open(NULL, _PATH_DEVNULL, NULL, O_RDONLY, NULL);
memf = _PATH_DEVNULL;
fd = open(_PATH_DEVNULL, O_RDONLY);
if (flags & DIRECTORY || strcmp(from_name, _PATH_DEVNULL)) {
fd = open(_PATH_DEVNULL, O_RDWR, 0);
log_warn("cannot open %s", _PATH_DEVNULL);
nullfd = open(_PATH_DEVNULL, O_RDWR, 0);
log_err(1, "cannot open %s", _PATH_DEVNULL);
fd = open(_PATH_DEVNULL, O_RDWR, 0);
log_err("Could not open %s", _PATH_DEVNULL);
if ((hr_kd = kvm_open(NULL, _PATH_DEVNULL, NULL, O_RDONLY,
fd = open(_PATH_DEVNULL, O_WRONLY);
fd = open(_PATH_DEVNULL, O_WRONLY);
fd = open(_PATH_DEVNULL, O_WRONLY);
(void)open(_PATH_DEVNULL, O_RDWR);
(void)open(_PATH_DEVNULL, O_RDWR);
(void)open(_PATH_DEVNULL, O_RDWR);
if (!(f = fopen(_PATH_DEVNULL, "r")))
err(ERROR_EXIT, _PATH_DEVNULL);
(void) open(_PATH_DEVNULL, O_WRONLY);
(void) open(_PATH_DEVNULL, O_WRONLY);
if (open(_PATH_DEVNULL, O_RDWR) != STDERR_FILENO) {
_PATH_DEVNULL, strerror(errno));
open(_PATH_DEVNULL, O_RDWR); /* Leave it closed if it fails... */
else if ((fd = open(_PATH_DEVNULL, O_RDWR)) == -1) {
_PATH_DEVNULL, strerror(errno));
if ((holdfd[0] = open(_PATH_DEVNULL, O_RDWR)) == -1) {
fprintf(stderr, "Cannot open %s !\n", _PATH_DEVNULL);
freopen(_PATH_DEVNULL, "w", stderr);
freopen(_PATH_DEVNULL, "w", stderr);
freopen(_PATH_DEVNULL, "w", stderr);
freopen(_PATH_DEVNULL, "w", stderr);
freopen(_PATH_DEVNULL, "w", stderr);
freopen(_PATH_DEVNULL, "w", stderr);
freopen(_PATH_DEVNULL, "w", stderr);
freopen(_PATH_DEVNULL, "w", stderr);
freopen(_PATH_DEVNULL, "w", stderr);
freopen(_PATH_DEVNULL, "w", stderr);
nulldesc = open(_PATH_DEVNULL, O_RDWR);
warn("cannot open %s", _PATH_DEVNULL);