Mercurial > dropbear
comparison compat.c @ 1411:798854f62430 fuzz
merge from main
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 14 Jun 2017 23:31:42 +0800 |
parents | 271c57aa3da5 |
children |
comparison
equal
deleted
inserted
replaced
1408:27e65d3aed5f | 1411:798854f62430 |
---|---|
172 return -1; | 172 return -1; |
173 | 173 |
174 if (!nochdir) | 174 if (!nochdir) |
175 (void)chdir("/"); | 175 (void)chdir("/"); |
176 | 176 |
177 if (!noclose && (fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) { | 177 if (!noclose && (fd = open(DROPBEAR_PATH_DEVNULL, O_RDWR, 0)) != -1) { |
178 (void)dup2(fd, STDIN_FILENO); | 178 (void)dup2(fd, STDIN_FILENO); |
179 (void)dup2(fd, STDOUT_FILENO); | 179 (void)dup2(fd, STDOUT_FILENO); |
180 (void)dup2(fd, STDERR_FILENO); | 180 (void)dup2(fd, STDERR_FILENO); |
181 if (fd > STDERR_FILENO) | 181 if (fd > STDERR_FILENO) |
182 (void)close(fd); | 182 (void)close(fd); |