Searched refs:nullfd (Results 1 – 6 of 6) sorted by relevance
75 int nullfd = -1, r; in xentoolcore__restrict_by_dup2_null() local81 nullfd = open("/dev/null", O_RDONLY); in xentoolcore__restrict_by_dup2_null()82 if (nullfd < 0) goto err; in xentoolcore__restrict_by_dup2_null()84 r = dup2(nullfd, fd); in xentoolcore__restrict_by_dup2_null()87 close(nullfd); in xentoolcore__restrict_by_dup2_null()91 if (nullfd >= 0) close(nullfd); in xentoolcore__restrict_by_dup2_null()
255 int nullfd, ret = 0; in do_daemonize() local277 CHK_SYSCALL(nullfd = open("/dev/null", O_RDONLY)); in do_daemonize()278 assert(nullfd >= 3); in do_daemonize()280 dup2(nullfd, 0); in do_daemonize()284 close(nullfd); in do_daemonize()
33 int nullfd = -1;45 if (nullfd >= 0) close(nullfd);
103 let nullfd = Unix.openfile "/dev/null" [ Unix.O_WRONLY ] 0 in106 Unix.dup2 nullfd Unix.stdout;107 Unix.dup2 nullfd Unix.stderr;108 with exn -> Unix.close nullfd; raise exn110 Unix.close nullfd
1106 int hotplug, nullfd = -1; in device_hotplug() local1186 nullfd = open("/dev/null", O_RDONLY); in device_hotplug()1187 if (nullfd < 0) { in device_hotplug()1199 aes->stdfds[0] = nullfd; in device_hotplug()1207 close(nullfd); in device_hotplug()1213 if (nullfd >= 0) close(nullfd); in device_hotplug()
81 int nullfd = -1;93 if (nullfd >= 0) close(nullfd);
Completed in 11 milliseconds