Mercurial > dropbear
comparison compat.c @ 1387:e7f11ed5fe28
Use DROPBEAR_PATH_DEVNULL instead of undefined _PATH_DEVNULL
author | Ben Gardner <bgardner@wabtec.com> |
---|---|
date | Tue, 24 May 2016 17:34:10 -0500 |
parents | a0062a354a80 |
children | 271c57aa3da5 |
comparison
equal
deleted
inserted
replaced
1300:4fb9261ef02a | 1387:e7f11ed5fe28 |
---|---|
175 return -1; | 175 return -1; |
176 | 176 |
177 if (!nochdir) | 177 if (!nochdir) |
178 (void)chdir("/"); | 178 (void)chdir("/"); |
179 | 179 |
180 if (!noclose && (fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) { | 180 if (!noclose && (fd = open(DROPBEAR_PATH_DEVNULL, O_RDWR, 0)) != -1) { |
181 (void)dup2(fd, STDIN_FILENO); | 181 (void)dup2(fd, STDIN_FILENO); |
182 (void)dup2(fd, STDOUT_FILENO); | 182 (void)dup2(fd, STDOUT_FILENO); |
183 (void)dup2(fd, STDERR_FILENO); | 183 (void)dup2(fd, STDERR_FILENO); |
184 if (fd > STDERR_FILENO) | 184 if (fd > STDERR_FILENO) |
185 (void)close(fd); | 185 (void)close(fd); |