Home
last modified time | relevance | path

Searched refs:dupfd (Results 1 – 2 of 2) sorted by relevance

/external/dropbear/
Dscpmisc.c231 int nullfd, dupfd; in sanitise_stdfd() local
233 if ((nullfd = dupfd = open(_PATH_DEVNULL, O_RDWR)) == -1) { in sanitise_stdfd()
237 while (++dupfd <= 2) { in sanitise_stdfd()
239 if (fcntl(dupfd, F_GETFL, 0) >= 0) in sanitise_stdfd()
241 if (dup2(nullfd, dupfd) == -1) { in sanitise_stdfd()
/external/openssh/
Dmisc.c720 int nullfd, dupfd; in sanitise_stdfd() local
722 if ((nullfd = dupfd = open(_PATH_DEVNULL, O_RDWR)) == -1) { in sanitise_stdfd()
727 while (++dupfd <= 2) { in sanitise_stdfd()
729 if (fcntl(dupfd, F_GETFL, 0) >= 0) in sanitise_stdfd()
731 if (dup2(nullfd, dupfd) == -1) { in sanitise_stdfd()