Lines Matching defs:devnullfd
41 static int devnullfd = -1;
121 if (devnullfd != -1) {
122 if (devnullfd != _fileno(stdin)) {
124 (void)_dup2(devnullfd, _fileno(stdin));
126 if (devnullfd != _fileno(stdout)) {
128 (void)_dup2(devnullfd, _fileno(stdout));
130 if (devnullfd != _fileno(stderr)) {
132 (void)_dup2(devnullfd, _fileno(stderr));
139 devnullfd = open("NUL", O_RDWR, 0);
144 if (devnullfd != _fileno(stdin) &&
145 devnullfd != _fileno(stdout) &&
146 devnullfd != _fileno(stderr)) {
147 close(devnullfd);
148 devnullfd = -1;