Searched refs:dupfd (Results 1 – 2 of 2) sorted by relevance
/external/dropbear/ |
D | scpmisc.c | 231 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/ |
D | misc.c | 720 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()
|